Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.02MB] [CPU: ▼2.78ms] Passed 4 tests
This is a short check of server-side resources used by GP hide menu options by role
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 40.20 ▼0.06 |
Dashboard /wp-admin | 3.33 ▲0.02 | 49.26 ▲2.10 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 48.63 ▼7.42 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 88.17 ▼1.11 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 33.44 ▼2.51 |
GP Hide Menu Options by Role /wp-admin/options-general.php?page=gp-hide-menu-options-by-role-admin | 3.20 | 36.90 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for GP hide menu options by role
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.20 ▼1.18 | 1.71 ▼0.43 | 44.23 ▼0.30 |
Dashboard /wp-admin | 2,213 ▲28 | 5.90 ▼0.04 | 101.08 ▼13.67 | 42.27 ▼0.60 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.00 ▲0.02 | 35.31 ▼1.57 | 32.60 ▼0.93 |
Add New Post /wp-admin/post-new.php | 1,517 ▼17 | 17.67 ▼5.54 | 699.77 ▲23.22 | 60.03 ▲10.52 |
Media Library /wp-admin/upload.php | 1,386 ▲4 | 4.19 ▼0.00 | 97.94 ▼2.21 | 41.49 ▼0.19 |
GP Hide Menu Options by Role /wp-admin/options-general.php?page=gp-hide-menu-options-by-role-admin | 887 | 1.68 | 28.20 | 26.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
- 4 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=gp-hide-menu-options-by-role-admin
- > Notice in wp-content/plugins/gp-hide-menu-options-by-role/index.php+96
Trying to access array offset on value of type bool
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-hide-menu-options-by-role/index.php:33
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: role, admin, hide, menu
gp-hide-menu-options-by-role/index.php 92% from 13 tests
The primary PHP file in "GP hide menu options by role" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("gp-hide-menu-options-by-role.php" instead of "index.php")
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
No dangerous file extensions were detected117 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 24 | 10 | 117 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
No PNG files were detected