Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/user-hierarchy/lib/adminmenu.php+28
Non-static method JWUH_AdminMenu::init() should not be called statically
Server metrics [RAM: ▼1.89MB] [CPU: ▼60.05ms] Passed 4 tests
Server-side resources used by User Hierarchy
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.02 | 46.66 ▲4.80 |
Dashboard /wp-admin | 2.10 ▼1.25 | 5.97 ▼52.38 |
Posts /wp-admin/edit.php | 2.10 ▼1.30 | 5.37 ▼56.36 |
Add New Post /wp-admin/post-new.php | 2.10 ▼3.83 | 5.30 ▼99.31 |
Media Library /wp-admin/upload.php | 2.10 ▼1.17 | 5.15 ▼32.13 |
User Hierarchy /wp-admin/options-general.php?page=userhierarchy-access | 2.10 | 6.52 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by User Hierarchy
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲34 | 14.31 ▼0.25 | 2.00 ▲0.14 | 43.44 ▼0.12 |
Dashboard /wp-admin | 2,198 ▲21 | 5.51 ▼0.09 | 88.58 ▼6.30 | 38.17 ▼4.15 |
Posts /wp-admin/edit.php | 2,106 ▲6 | 2.00 ▼0.03 | 33.47 ▼8.67 | 36.95 ▼3.18 |
Add New Post /wp-admin/post-new.php | 1,531 ▲5 | 22.93 ▲1.64 | 662.85 ▼30.46 | 62.92 ▲7.51 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.17 ▼0.01 | 101.40 ▼14.94 | 46.19 ▲1.28 |
User Hierarchy /wp-admin/options-general.php?page=userhierarchy-access | 2,155 | 1.83 | 44.09 | 33.66 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/user-hierarchy/lib/adminmenu.php+28
Non-static method JWUH_AdminMenu::init() should not be called statically
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Deprecated in wp-content/plugins/user-hierarchy/lib/adminmenu.php+28
Non-static method JWUH_AdminMenu::init() should not be called statically
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method JWUH_AdminMenu::menu() should not be called statically
- 16 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Notice in wp-content/plugins/user-hierarchy/lib/classes/AdminMenuPage/class.Access.php+133
Undefined index: administrator
- 230 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Notice in wp-content/plugins/user-hierarchy/lib/classes/AdminMenuPage/class.Access.php+133
Trying to access array offset on value of type null
- 16 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Notice in wp-content/plugins/user-hierarchy/lib/classes/AdminMenuPage/class.Access.php+133
Undefined index: editor
- 16 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Notice in wp-content/plugins/user-hierarchy/lib/classes/AdminMenuPage/class.Access.php+133
Undefined index: author
- 16 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Notice in wp-content/plugins/user-hierarchy/lib/classes/AdminMenuPage/class.Access.php+133
Undefined index: contributor
- 16 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=userhierarchy-access
- > Notice in wp-content/plugins/user-hierarchy/lib/classes/AdminMenuPage/class.Access.php+133
Undefined index: subscriber
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-hierarchy/lib/admin.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/user-hierarchy/user-hierarchy.php:17
- > PHP Fatal error
require_once(): Failed opening required 'JWUH_LIBRARY_PATH/classes/AdminMenuPage/class.Access.php' (include_path='.:/usr/share/php') in wp-content/plugins/user-hierarchy/lib/adminmenu.php on line 12
- > PHP Warning
Use of undefined constant JWUH_LIBRARY_PATH - assumed 'JWUH_LIBRARY_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-hierarchy/lib/adminmenu.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-hierarchy/lib/roles.php:13
- > PHP Warning
require_once(JWUH_LIBRARY_PATH/classes/AdminMenuPage/class.Access.php): failed to open stream: No such file or directory in wp-content/plugins/user-hierarchy/lib/adminmenu.php on line 12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: role, promote, users, create, roles...
user-hierarchy/user-hierarchy.php 92% from 13 tests
The primary PHP file in "User Hierarchy" version 0.1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Description: Keep the plugin description shorter than 140 characters (currently 171 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected546 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 130 | 257 | 452 |
PO File | 1 | 8 | 10 | 45 |
JavaScript | 1 | 7 | 3 | 25 |
CSS | 1 | 4 | 4 | 24 |
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.35 |
Average class complexity | 14.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 31.00 |
Average method complexity | 2.83 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 36 | |
▷ Static methods | 11 | 30.56% |
▷ Public methods | 36 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/arrow-down.png | 1.04KB | 0.20KB | ▼ 81.14% |
public/images/switch.png | 1.28KB | 0.47KB | ▼ 62.95% |
public/images/helparrow-q2-cc.png | 1.25KB | 0.60KB | ▼ 52.26% |
public/images/helparrow-q4-cc.png | 1.27KB | 0.62KB | ▼ 51.30% |
public/images/helparrow-q3-c.png | 1.27KB | 0.63KB | ▼ 50.39% |