Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼1.99ms] Passed 4 tests
This is a short check of server-side resources used by Different Menu in Different Pages - Control Menu Visibility (All in One)
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 37.07 ▼1.78 |
Dashboard /wp-admin | 3.37 ▲0.06 | 50.59 ▲1.74 |
Posts /wp-admin/edit.php | 3.42 ▲0.06 | 46.21 ▼1.39 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.07 | 83.99 ▼3.86 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 34.64 ▼0.94 |
Different Menus /wp-admin/options-general.php?page=different-menus-in-different-pages | 3.51 | 61.37 |
Server storage [IO: ▲1.15MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 8 new options
New WordPress options |
---|
theysaidso_admin_options |
category_children |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
dmidp_notices |
Browser metrics Passed 4 tests
Checking browser requirements for Different Menu in Different Pages - Control Menu Visibility (All in One)
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,915 ▲158 | 13.60 ▼0.79 | 5.34 ▲3.37 | 44.64 ▲0.61 |
Dashboard /wp-admin | 2,213 ▲28 | 5.83 ▼0.04 | 107.23 ▼10.98 | 42.10 ▼15.37 |
Posts /wp-admin/edit.php | 2,096 ▲7 | 2.02 ▲0.05 | 36.66 ▲0.54 | 30.20 ▼4.08 |
Add New Post /wp-admin/post-new.php | 6,318 ▲4,790 | 19.41 ▼4.00 | 900.46 ▲217.65 | 74.05 ▲21.52 |
Media Library /wp-admin/upload.php | 1,395 ▲10 | 4.16 ▼0.04 | 109.05 ▲0.92 | 48.15 ▲3.00 |
Different Menus /wp-admin/options-general.php?page=different-menus-in-different-pages | 2,858 | 2.33 | 37.30 | 84.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The uninstall procedure has failed, leaving 8 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- dmidp_notices
- category_children
- can_compress_scripts
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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 perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/different-menus-in-different-pages/public/partials/different-menus-for-different-page-public-display.php
- 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_nav_menus() in wp-content/plugins/different-menus-in-different-pages/admin/partials/Tabs/DuplicateMenus.php:1
- > PHP Fatal error
Uncaught Error: Class 'TabOrganizer' not found in wp-content/plugins/different-menus-in-different-pages/admin/partials/TabItems/Pages.php:7
- > PHP Fatal error
Uncaught Error: Class 'TabOrganizer' not found in wp-content/plugins/different-menus-in-different-pages/admin/partials/TabItems/Categories.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/different-menus-in-different-pages/admin/partials/Tabs/RemoveMenu.php:7
- > PHP Fatal error
Uncaught Error: Class 'TabOrganizer' not found in wp-content/plugins/different-menus-in-different-pages/admin/partials/TabItems/PostTypes.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function DMIDP\\AjaxRequests\\add_action() in wp-content/plugins/different-menus-in-different-pages/admin/includes/AjaxRequests/duplicate-menus.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/different-menus-in-different-pages/admin/partials/Tabs/BackUpAndRestore.php:7
- > PHP Fatal error
Uncaught Error: Class 'TabOrganizer' not found in wp-content/plugins/different-menus-in-different-pages/admin/partials/TabItems/Taxonomies.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/different-menus-in-different-pages/admin/partials/Tabs/ResetSettings.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/different-menus-in-different-pages/admin/deactivate-reason/deactivate_reason.php:10
- > 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 83% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
- Tags: You are using too many tags: 17 tag instead of maximum 10
- Requires at least: Version format is invalid
different-menus-in-different-pages/different-menus-in-different-page.php 77% from 13 tests
Analyzing the main PHP file in "Different Menu in Different Pages - Control Menu Visibility (All in One)" version 2.3.2
The following require your attention:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("different-menus-in-different-pages.php" instead of "different-menus-in-different-page.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 213 characters long)
Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin10,079 lines of code in 59 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 8 | 668 | 44 | 3,930 |
PHP | 37 | 961 | 703 | 3,160 |
JavaScript | 13 | 453 | 183 | 2,976 |
SVG | 1 | 1 | 0 | 13 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Method cyclomatic complexity has to be reduced to less than 100 (currently 110)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 16.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 153.00 |
Average method complexity | 4.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 110.00 |
Code structure | ||
---|---|---|
Namespaces | 13 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 26 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 26 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 104 | |
▷ Static methods | 2 | 1.92% |
▷ Public methods | 99 | 95.19% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 4.81% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/recorp-logo.png | 10.36KB | 3.47KB | ▼ 66.54% |
admin/images/flags.png | 26.02KB | 26.27KB | 0.00% |