manifest / performance / user-roles-table
User Role Tables
Move WordPress user roles to a custom table.
★ 0stars
8composer installs
0forks
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/cloudcatch/user-roles-table/archive/refs/heads/master.zipAlso on Packagist as cloudcatch/user-roles-table:
composer require cloudcatch/user-roles-tableFrom the readme
User Role Tables for WPUserQuery
A lightweight and efficient WordPress plugin that mirrors user roles into a custom database table to optimize performance for WPUserQuery and getusers() calls. By offloading role-based queries to a dedicated table, this plugin reduces database overhead, making large-scale user management faster and more reliable.
Installation
Install and activate the plugin. This should automatically install the database table: wpuserroles.
Run the following command to copy all user role data to the new wpuserroles table:
This command will extract all users roles and capabilities from wppostmeta, and insert this data is a more performant schema in the wpuserroles database table.
Running Unit Tests
To ensure the plugin works as expected, you can run the included unit tests. Follow the steps below:
Prerequisites
- Make sure you have Docker installed and running on your machine (required for wp-env).
- Ensure you have Composer installed to manage PHP dependencies.
Steps to Run Tests
1. Start the WordPress Environment:
Use wp-env to spin up a local WordPress environment:
bash
composer install
3. Run the Tests:
Execute the Composer test script to
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.