Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/menu-rules/rules/active-parent.php+4
Function create_function() is deprecated
Server metrics [RAM: ▼1.91MB] [CPU: ▼52.69ms] Passed 4 tests
A check of server-side resources used by Menu Rules
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.07 ▼1.39 | 5.80 ▼35.45 |
Dashboard /wp-admin | 2.09 ▼1.21 | 5.40 ▼54.43 |
Posts /wp-admin/edit.php | 2.09 ▼1.26 | 5.36 ▼41.96 |
Add New Post /wp-admin/post-new.php | 2.09 ▼3.79 | 5.88 ▼78.90 |
Media Library /wp-admin/upload.php | 2.09 ▼1.14 | 6.69 ▼25.95 |
Menu Rules /wp-admin/edit.php?post_type=menu_rule | 2.09 | 5.73 |
Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for Menu Rules
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,810 ▲75 | 13.69 ▼0.87 | 1.92 ▼0.00 | 45.81 ▲2.38 |
Dashboard /wp-admin | 2,210 ▲22 | 4.84 ▼0.07 | 114.85 ▲15.01 | 41.58 ▼2.67 |
Posts /wp-admin/edit.php | 2,099 ▲10 | 2.02 ▲0.03 | 42.22 ▲3.27 | 33.87 ▼1.41 |
Add New Post /wp-admin/post-new.php | 1,550 ▲8 | 18.23 ▲0.09 | 600.55 ▼0.74 | 56.76 ▲7.61 |
Media Library /wp-admin/upload.php | 1,395 ▲13 | 4.23 ▼0.18 | 100.80 ▼4.46 | 44.15 ▲0.62 |
Menu Rules /wp-admin/edit.php?post_type=menu_rule | 1,071 | 1.96 | 30.78 | 29.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/menu-rules/rules/active-parent.php+4
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
- 6 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=menu_rule
- > POST request to /wp-admin/admin-ajax.php
- > Deprecated in wp-content/plugins/menu-rules/rules/child-page.php+4
Function create_function() is deprecated
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
Please fix the following
- 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-rules/rules/child-page.php:4
- > PHP Fatal error
Uncaught Error: Class 'PB_Meta_Box' not found in wp-content/plugins/menu-rules/admin/meta-box-conditions.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-rules/libs/scb-framework/scb-info.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-rules/libs/scb-framework/scb/load.php:27
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-rules/libs/scb-framework/scb/load.php:31
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/menu-rules/libs/scb-framework/scb/Widget.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-rules/libs/scb-framework/scb/load.php:31
- > PHP Fatal error
Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/menu-rules/libs/scb-framework/scb/BoxesPage.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-rules/rules/active-parent.php:4
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/menu-rules/libs/scb-framework/scb/Widget.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: rules, active menu, menus, parent menu, context...
menu-rules/menu-rules.php Passed 13 tests
The main PHP file in "Menu Rules" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
100 characters long description:
An extension of the menu system with context-based rules and a flexible framework to write your own.
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
Success! There were no dangerous files found in this plugin2,888 lines of code in 29 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 25 | 837 | 447 | 2,481 |
CSS | 2 | 10 | 13 | 402 |
JavaScript | 2 | 1 | 8 | 5 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 15.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 74.00 |
Average method complexity | 2.77 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 25 | |
▷ Abstract classes | 5 | 20.00% |
▷ Concrete classes | 20 | 80.00% |
▷ Final classes | 0 | 0.00% |
Methods | 200 | |
▷ Static methods | 92 | 46.00% |
▷ Public methods | 160 | 80.00% |
▷ Protected methods | 10 | 5.00% |
▷ Private methods | 30 | 15.00% |
Functions | 25 | |
▷ Named functions | 25 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
libs/pb-framework/assets/vendor/chosen/chosen-sprite.png | 1.52KB | 0.70KB | ▼ 54.36% |