Role Right-Sizer
Recommends the smallest role each user needs, based on what they actually do, with one-click undo.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/aryanjasala/role-right-sizer/archive/refs/heads/main.zip![]()
Role Right-Sizer
Recommends the smallest role each user needs, based on what they actually do. Spots dormant accounts and unused capabilities, and every change undoes in one click.
Sites collect administrators who only ever write posts, old agency accounts nobody uses, and capabilities a plugin added years ago. Role editors let you change roles, but they don't tell you what to change. Role Right-Sizer records which capabilities each person actually uses, then recommends the smallest role that covers it. Nothing changes until you apply a recommendation, and every change can be undone.
[!NOTE] Free and open source under the GPL. No pro version, no upsells, no ads in wp-admin, no tracking. And it stays that way.
Features
- Usage recording from the events WordPress already fires, admin screen visits, REST requests that change something, and ability runs. Written once per request, at most once an hour per capability
- Smaller role: the smallest existing role that covers everything a person used, with the capabilities they would lose and when they last used each one
- Dormant accounts (no activity for 90 days) and never logged in since tracking began, with no role or a fallback role
- Unused capabilities on roles: plugin and custom capabilities no user of the role used, grouped by role and by the plugin they belong to. Never on the Administrator role, and only once a capability has been on its role for the whole window
- Confirmation that lists every capability a change takes away, and a change log with Undo for one change or a whole batch
- Safe by default: a 30-day learning period, never more access than now, the last administrator and your own account are never changed, administrator capabilities are never suggested for removal, an active plugin's capabilities are marked and left out of
apply --all, exclude lists for people and roles - CSV download, WP-CLI, abilities for AI agents, a Site Health check, and filters and actions for every default and change
Install
- Download
role-right-sizer.zipfrom the latest release. - In WordPress, go to Plugins > Add New Plugin > Upload Plugin, choose the zip and activate it.
Or with WP-CLI:
wp plugin install https://github.com/aryanjasala/role-right-sizer/releases/latest/download/role-right-sizer.zip --activate
Needs WordPress 6.6+ and PHP 7.4+. To try it first, the Try in WordPress Playground badge opens a throwaway WordPress in your browser with the plugin and some demo content.
Quick look
After the learning period, see and apply recommendations from the command line, with a dry run first:
wp role-right-sizer report
wp role-right-sizer apply --all --dry-run
wp role-right-sizer apply pat
wp role-right-sizer undo 12 --batch
Recommendations change roles through core's own set_role(), so other plugins see every change.
Screenshots
Users > Right-Sizer: a smaller role, dormant accounts and unused capabilities on roles, grouped by role |
![]() The confirmation step lists every capability each change takes away |
![]() The change log, with Undo for one change or the whole batch |
![]() The learning period, with how long is left before recommendations show up |
Documentation
| Doc | What it covers |
|---|---|
| Reference | How usage is recorded, how recommendations are made, hooks, abilities, WP-CLI and what is stored |
| Development | Local setup, commands and tests |
| Contributing | Pull requests, required checks and PR titles |
| Releasing | How merged pull requests become releases |
| Security | Reporting a vulnerability |
| readme.txt | What WordPress.org shows, with the FAQ and changelog |
Project structure
role-right-sizer.php plugin header and PSR-4 autoloader
src/
├── Plugin.php creates the services
├── Settings.php settings, tracking start and the filtered limits
├── Usage/
│ ├── Recorder.php collects use in a request, writes it on shutdown
│ ├── HookMap.php which hook proves which capability
│ ├── AdminScreens.php admin screen visits
│ ├── RestWatcher.php REST permission checks and ability runs
│ └── Store.php per-user, per-site storage
├── Recommender.php smallest role, dormant, never logged in, unused capabilities
├── Report.php batched build, kept in an option
├── Applier.php apply and undo, with the protections
├── Changes.php the change log
├── Admin/ Users > Right-Sizer and the network screen
├── Health/SiteHealth.php the Site Health check
├── Privacy.php exporter, eraser, policy text
├── Abilities.php abilities for AI agents
└── Cli/Command.php wp role-right-sizer
assets/admin.css
tests/
├── Unit/ PHPUnit
└── e2e/ Playwright specs and the Docker site
.wordpress-org/ screenshots, icon and banner
docs/ reference, development, contributing, releasing
More free plugins
Small plugins that each fill one gap in WordPress, all free with no pro version:
| Plugin | What it does | |
|---|---|---|
| Page Template Usage | See which template every page uses, and fix the pages on a missing template | |
| Staging Guard | Stops staging copies from emailing real people or getting indexed | |
| Category & Tag Trash | A trash for categories, tags and custom terms, with undo and full restore | |
| Site Read-Only Mode | Read-only mode for WordPress during migrations and deploys | |
| Restore Blocks from Revisions | Restore a single block from an old revision, not the whole post | |
| Activity Log with Undo | An activity log where every change you can reverse has an Undo button | |
| Agent Governance | Hold risky AI agent calls for approval, preview what they change, and roll back a session | |
| Block Doctor | Scan the whole site for invalid and broken blocks and fix them in bulk, with undo | |
| Block Theme Ops | Find Site Editor changes that override your theme files, see the diff, reset them or send them to Git | |
| Update Rehearsal | Try plugin, theme, core and PHP updates on a disposable copy of your site in WordPress Playground first | |
| User Session Manager | See every device signed in, sign out one, and limit sessions per role |
License
Copyright Aryan Jasala. Licensed under GPL-2.0-or-later.


