Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.11MB] [CPU: ▼5.30ms] Passed 4 tests
Analyzing server-side resources used by Nav Menu Roles
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 39.23 ▼7.42 |
Dashboard /wp-admin | 3.42 ▲0.11 | 46.77 ▼1.83 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 45.80 ▼3.08 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.11 | 81.15 ▼8.86 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 35.41 ▲1.99 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Nav Menu Roles
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲28 | 14.28 ▼0.07 | 1.79 ▼0.08 | 38.13 ▼3.84 |
Dashboard /wp-admin | 2,192 ▲15 | 5.56 ▼0.02 | 80.35 ▼7.28 | 37.58 ▼2.00 |
Posts /wp-admin/edit.php | 2,100 ▲3 | 2.02 ▲0.03 | 33.28 ▼1.58 | 35.61 ▼0.30 |
Add New Post /wp-admin/post-new.php | 1,535 ▲4 | 18.26 ▼4.76 | 609.80 ▼53.77 | 63.71 ▲7.68 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.17 ▼0.05 | 95.02 ▼6.33 | 42.16 ▼2.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/nav-menu-roles/inc/class-walker-nav-menu-edit-roles-4.5.php:17
- > PHP Fatal error
Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/nav-menu-roles/inc/class-walker-nav-menu-edit-roles-4.7.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function Customize_Nav_Menu_Roles\\add_action() in wp-content/plugins/nav-menu-roles/inc/customizer.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: nav menus, menu, nav menu, menus
nav-menu-roles/nav-menu-roles.php Passed 13 tests
"Nav Menu Roles" version 2.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
43 characters long description:
Hide custom menu items based on user roles.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,265 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 272 | 609 | 1,029 |
PO File | 2 | 88 | 110 | 234 |
JavaScript | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 24.80 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 63.00 |
Average method complexity | 3.70 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 22.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 44 | |
▷ Static methods | 2 | 4.55% |
▷ Public methods | 43 | 97.73% |
▷ Protected methods | 1 | 2.27% |
▷ Private methods | 0 | 0.00% |
Functions | 11 | |
▷ Named functions | 9 | 81.82% |
▷ Anonymous functions | 2 | 18.18% |
Constants | 3 | |
▷ Global constants | 1 | 33.33% |
▷ Class constants | 2 | 66.67% |
▷ Public constants | 2 | 100.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