WP Manifestindependent plugin directory
manifest / performance / roles-to-taxonomy

Roles to Taxonomy #7 in Performance & Caching

WordPress plugin to store user roles and levels in a taxonomy

by humanmade · github.com/humanmade/roles-to-taxonomy

95stars
46kcomposer installs
7forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/humanmade/roles-to-taxonomy/archive/refs/heads/master.zip

Also on Packagist as altis/roles-to-taxonomy:

composer require altis/roles-to-taxonomy

From the readme

Roles to Taxonomy WordPress plugin to store user roles and user levels in a taxonomy, for performance. Having many users in a WordPress database leads to some bad performance when it comes to quering for users by role, user level, or counting users. This is particularly a problem because the default WordPress admin users list table, post table and post edit screens all make these queries. The fundamental issue with the default WordPress storage mechanism is the use of Post Meta for user levels and roles. To add insult to injury, roles are stored as a serialized array, so any queries for users by role results in a MySQL LIKE query on an unindexed text column (metavalue). Roles to Taxonomy registers two shadow taxonomies to associate user objects with role/user level terms. This results in a much faster lookup for users in a given role. The term count field is also be used to calculate user counts in some cases. Performance Comparisons (2.2 million network users, 1.5 million on a single site) |Page|WordPress Default|Roles to Taxonomy| |---|---|---| |User List Table (all)|36 seconds|7 milliseconds| |User List Table (specific role)|29 seconds|5 milliseconds| |Post List Table|31 s

Read the full README on GitHub →

Releases

TagPublishedAssetDownloads
0.1.5Jan 4, 2023
0.1.4Nov 28, 2021
0.1.3Nov 24, 2021
0.1.2Aug 20, 2020