Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.53MB] [CPU: ▼10.62ms] 75% from 4 tests
An overview of server-side resources used by User Menus - Nav Menu Visibility
The following require your attention
- CPU: The total CPU usage must kept under 500.00ms (currently 1,796.49ms on /wp-admin/admin.php?page=user-menus)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.05 ▲0.59 | 39.26 ▼1.15 |
Dashboard /wp-admin | 3.90 ▲0.55 | 47.25 ▼18.24 |
Posts /wp-admin/edit.php | 3.95 ▲0.59 | 51.11 ▼3.46 |
Add New Post /wp-admin/post-new.php | 6.42 ▲0.53 | 82.50 ▼19.63 |
Media Library /wp-admin/upload.php | 3.66 ▲0.43 | 40.79 ▲6.83 |
User Menus /wp-admin/admin.php?page=user-menus | 4.16 | 1,796.49 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 4.02 | 37.66 |
Server storage [IO: ▲3.14MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 199 new files
Database: no new tables, 10 new options
New WordPress options |
---|
theysaidso_admin_options |
fs_debug_mode |
fs_accounts |
jpum_reviews_installed_on |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
fs_active_plugins |
Browser metrics Passed 4 tests
Checking browser requirements for User Menus - Nav Menu Visibility
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲72 | 13.61 ▼0.99 | 4.33 ▲2.69 | 31.47 ▼16.18 |
Dashboard /wp-admin | 2,221 ▲33 | 5.83 ▼0.06 | 97.80 ▼17.61 | 41.43 ▼1.51 |
Posts /wp-admin/edit.php | 2,107 ▲18 | 2.01 ▼0.05 | 39.71 ▲2.08 | 37.97 ▼2.47 |
Add New Post /wp-admin/post-new.php | 1,533 ▼0 | 23.20 ▲0.02 | 663.66 ▼10.95 | 63.68 ▲10.48 |
Media Library /wp-admin/upload.php | 1,409 ▲24 | 4.26 ▲0.06 | 97.26 ▲0.43 | 44.97 ▲0.01 |
User Menus /wp-admin/admin.php?page=user-menus | 973 | 1.84 | 26.72 | 61.96 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,047 | 1.85 | 25.54 | 24.10 |
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
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/user-menus/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- The uninstall procedure has failed, leaving 10 options in the database
- jpum_reviews_installed_on
- fs_debug_mode
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- fs_active_plugins
- fs_accounts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
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
The following issues need your attention
- 6× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-menus/includes/classes/walker/nav-menu-edit-custom-fields-deprecated.php on line 10
- > PHP Warning
require_once(ABSPATHwp-admin/includes/nav-menu.php): failed to open stream: No such file or directory in wp-content/plugins/user-menus/includes/classes/walker/nav-menu-edit-custom-fields-deprecated.php on line 10
- > PHP Warning
require_once(ABSPATHwp-admin/includes/nav-menu.php): failed to open stream: No such file or directory in wp-content/plugins/user-menus/includes/classes/walker/nav-menu-edit-custom-fields.php on line 13
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/nav-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/user-menus/includes/classes/walker/nav-menu-edit-custom-fields.php on line 13
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/nav-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/user-menus/includes/classes/walker/nav-menu-edit-custom-fields-deprecated.php on line 10
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-menus/includes/classes/walker/nav-menu-edit-custom-fields.php on line 13
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: logout, nav-menu, user, user-role, nav-menus...
user-menus/user-menus.php Passed 13 tests
The entry point to "User Menus - Nav Menu Visibility" version 1.3.2 is a PHP file that has certain tags in its header comment area
91 characters long description:
Quickly customize your menus with a user's name & avatar, or show items based on user role.
Code Analysis 97% from 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 plugin34,633 lines of code in 151 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 130 | 8,319 | 17,837 | 34,027 |
JavaScript | 5 | 58 | 60 | 291 |
Markdown | 1 | 68 | 0 | 214 |
CSS | 15 | 17 | 3 | 101 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 77.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 60 | |
▷ Abstract classes | 2 | 3.33% |
▷ Concrete classes | 58 | 96.67% |
▷ Final classes | 0 | 0.00% |
Methods | 1,318 | |
▷ Static methods | 236 | 17.91% |
▷ Public methods | 925 | 70.18% |
▷ Protected methods | 19 | 1.44% |
▷ Private methods | 374 | 28.38% |
Functions | 100 | |
▷ Named functions | 100 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 146 | |
▷ Global constants | 99 | 67.81% |
▷ Class constants | 47 | 32.19% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/icon-128x128.png | 20.92KB | 7.69KB | ▼ 63.23% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/user-menus.png | 22.56KB | 8.93KB | ▼ 60.43% |