Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.27MB] [CPU: ▲2.65ms] Passed 4 tests
An overview of server-side resources used by Roles & Capabilities
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 38.78 ▲0.99 |
Dashboard /wp-admin | 3.69 ▲0.39 | 46.17 ▼0.91 |
Posts /wp-admin/edit.php | 3.74 ▲0.39 | 46.29 ▲5.76 |
Add New Post /wp-admin/post-new.php | 6.21 ▲0.33 | 92.11 ▲5.39 |
Media Library /wp-admin/upload.php | 3.55 ▲0.33 | 38.66 ▲5.11 |
Capabilities /wp-admin/users.php?page=leira-roles-capabilities | 3.70 | 33.60 |
Roles /wp-admin/users.php?page=leira-roles | 3.73 | 33.89 |
Server storage [IO: ▲0.28MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Roles & Capabilities
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,810 ▲64 | 13.26 ▼1.00 | 4.57 ▲3.04 | 40.38 ▲0.15 |
Dashboard /wp-admin | 2,219 ▲27 | 4.89 ▼0.04 | 98.64 ▼21.69 | 39.59 ▼5.32 |
Posts /wp-admin/edit.php | 2,099 ▲10 | 2.00 ▼0.02 | 39.35 ▲5.19 | 35.17 ▲2.65 |
Add New Post /wp-admin/post-new.php | 1,526 ▼16 | 23.45 ▲5.12 | 635.99 ▼48.57 | 60.63 ▲8.38 |
Media Library /wp-admin/upload.php | 1,395 ▲4 | 4.29 ▲0.07 | 99.70 ▼1.51 | 43.39 ▲1.10 |
Capabilities /wp-admin/users.php?page=leira-roles-capabilities | 1,772 | 1.76 | 25.26 | 34.24 |
Roles /wp-admin/users.php?page=leira-roles | 1,816 | 2.35 | 39.72 | 32.64 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/leira-roles/public/partials/leira-roles-public-display.php
- > /wp-content/plugins/leira-roles/admin/partials/leira-roles-admin-display.php
- 6× PHP files trigger server errors when accessed directly:
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/leira-roles/admin/class-leira-roles-list-table.php on line 4
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/leira-roles/admin/class-leira-roles-capabilities-list-table.php on line 4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/leira-roles/admin/class-leira-roles-list-table.php on line 4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/leira-roles/admin/class-leira-roles-capabilities-list-table.php on line 4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/leira-roles/admin/class-leira-roles-capabilities-list-table.php on line 4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/leira-roles/admin/class-leira-roles-list-table.php on line 4
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: capabilities, role, member, admin, user...
leira-roles/leira-roles.php Passed 13 tests
The main PHP script in "Roles & Capabilities" version 1.1.8.0 is automatically included on every request by WordPress
139 characters long description:
Roles & Capabilities is a plugin that will allows you to manage user roles and capabilities and also assign capabilities to specific users.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,914 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 548 | 1,642 | 1,989 |
JavaScript | 9 | 126 | 366 | 442 |
PO File | 1 | 136 | 181 | 290 |
Sass | 1 | 40 | 2 | 116 |
CSS | 2 | 3 | 5 | 77 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 22.17 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 84.00 |
Average method complexity | 2.72 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 126 | |
▷ Static methods | 3 | 2.38% |
▷ Public methods | 95 | 75.40% |
▷ Protected methods | 26 | 20.63% |
▷ Private methods | 5 | 3.97% |
Functions | 8 | |
▷ Named functions | 3 | 37.50% |
▷ Anonymous functions | 5 | 62.50% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin