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.15MB] [CPU: ▼2.16ms] Passed 4 tests
Server-side resources used by Nav Menu Collapse
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.60 ▲0.13 | 41.71 ▼8.88 |
Dashboard /wp-admin | 3.46 ▲0.15 | 54.31 ▲3.33 |
Posts /wp-admin/edit.php | 3.57 ▲0.22 | 50.08 ▼0.25 |
Add New Post /wp-admin/post-new.php | 6.04 ▲0.15 | 88.57 ▼2.84 |
Media Library /wp-admin/upload.php | 3.38 ▲0.15 | 40.69 ▲3.55 |
Nav Menu Collapse /wp-admin/options-general.php?page=nav_menu_collapse_settings | 3.56 | 36.57 |
Server storage [IO: ▲0.69MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
nav_menu_collapse_version |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Nav Menu Collapse
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.36 ▼0.01 | 2.02 ▼0.22 | 43.85 ▼3.02 |
Dashboard /wp-admin | 2,196 ▲19 | 5.55 ▼0.11 | 96.41 ▼0.11 | 42.09 ▼2.34 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.99 ▼0.03 | 34.08 ▼3.59 | 32.81 ▼1.59 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.09 ▼0.36 | 659.17 ▼58.24 | 60.67 ▲7.55 |
Media Library /wp-admin/upload.php | 1,404 ▲1 | 4.19 ▼0.09 | 99.70 ▼9.37 | 43.91 ▼0.59 |
Nav Menu Collapse /wp-admin/options-general.php?page=nav_menu_collapse_settings | 1,241 | 2.60 | 51.46 | 47.53 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- nav_menu_collapse_version
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=nav_menu_collapse_settings
- > request to
- > Notice in wp-config.php+20
Undefined index: REQUEST_METHOD
SRP Passed 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
nav-menu-collapse/nav-menu-collapse.php Passed 13 tests
This is the main PHP file of "Nav Menu Collapse" version 2.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
79 characters long description:
Adds functionality to collapse and expand nav menus within the WordPress admin.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin4,431 lines of code in 32 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 23 | 466 | 1,830 | 1,843 |
JavaScript | 4 | 463 | 3 | 1,308 |
CSS | 4 | 36 | 3 | 1,274 |
JSON | 1 | 0 | 0 | 6 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
Average class complexity | 11.95 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 75.00 |
Average method complexity | 3.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 2 | 10.00% |
▷ Concrete classes | 18 | 90.00% |
▷ Final classes | 18 | 100.00% |
Methods | 96 | |
▷ Static methods | 38 | 39.58% |
▷ Public methods | 77 | 80.21% |
▷ Protected methods | 12 | 12.50% |
▷ Private methods | 7 | 7.29% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 22 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 22 | 100.00% |
▷ Public constants | 22 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.44MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/release/images/YourWordPressDXP300x600.png | 136.86KB | 60.69KB | ▼ 55.65% |
assets/release/images/noakes-plugins.png | 8.04KB | 6.25KB | ▼ 22.23% |
assets/release/images/YourWordPressDXP728x90.png | 73.03KB | 33.27KB | ▼ 54.44% |
assets/debug/images/noakes-plugins.png | 8.04KB | 6.25KB | ▼ 22.23% |
assets/debug/images/robert-noakes.png | 6.28KB | 5.31KB | ▼ 15.39% |