"New User Default Role" dropdown should order by privilege level

Description

The New User Default Role dropdown at wp-admin/options-general.php is in spiffy random order:

Subscriber

Administrator

Editor

Author

Contributor

This UI bug suggests that Subscriber and Contributor are the opposite poles of privilege levels. In fact, they are successive steps in increasing privilege. Also, it doesn't make sense to put the least and greatest privileges, Subscriber and Administrator, next to each other.

Please let proximity and position serve their purpose: order this dropdown by level of access, starting with the least access:

Why would we not offer all roles as an option? All roles should be offered.

Visual hierarchy would place those with the most access at the top, not the bottom. Subscriber should be the bottom choice. It is probably at the top b/c when it was coded originally the devs decided that would be the default role rather than forcing the admin to choose by making the default menu state "Select Role" or something.

Visual hierarchy would place those with the most access at the top, not the bottom. Subscriber should be the bottom choice. It is probably at the top b/c when it was coded originally the devs decided that would be the default role rather than forcing the admin to choose by making the default menu state "Select Role" or something.

Counterpoint: It's good to encourage use of least privilege roles. Whatever's at the top is more likely to be selected than whatever's at the bottom. Therefore, put least privilege roles at the top.

Also, while ordering has meaning, what is it being ordered on? If it's being ordered on preferred roles, then least privilege at the top is exactly what you want.

Hold on, there's no creative way around this problem? Default roles couldn't somehow be arbitrarily ordered in the presentation layer? I don't want to give up on this so easily. It's a poor practice for the UI to not distinguish between hierarchical security roles.

By "hierarchical security roles", I mean there's a relationship between any 2 roles where role A contains all of role B's privileges and more. So you can set up a hierarchy of roles with progressive authority like A > B > C > D > E.

We have some sample solution of the problem, but there is one controversial point. I apply the two patches.

one with generic sort - all roles are sorted by capability count (we could discuss this criteria as we need some balance between productivity and end functionality)

second, separating them by type (default, custom). then sorting by capabilities is applied - first to default roles (which results in the order that we already know) and then on the custom.

The problem is that the function wp_dropdown_roles reorders them without the filter and places the default user role as first option element in the select, which is probably done for backwards compatibility, where selected="selected" could work in other way then expected. What would be the best solution for that matter?