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
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.04MB] [CPU: ▼4.16ms] Passed 4 tests
A check of server-side resources used by Menu Swapper
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 40.65 ▼1.20 |
Dashboard /wp-admin | 3.36 ▲0.01 | 50.58 ▼14.61 |
Posts /wp-admin/edit.php | 3.47 ▲0.12 | 53.99 ▲3.51 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 94.08 ▼4.35 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 39.41 ▲5.46 |
Menu Swapper /wp-admin/options-general.php?page=menu-swapper | 3.25 | 32.51 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Menu Swapper
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲7 | 14.31 ▼0.05 | 1.77 ▼0.27 | 41.15 ▲0.49 |
Dashboard /wp-admin | 2,202 ▲25 | 5.64 ▲0.05 | 94.19 ▲4.58 | 41.04 ▼5.46 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 1.98 ▼0.06 | 40.42 ▲2.94 | 35.04 ▼2.17 |
Add New Post /wp-admin/post-new.php | 6,284 ▲4,750 | 19.29 ▼4.03 | 922.51 ▲239.97 | 69.06 ▲12.55 |
Media Library /wp-admin/upload.php | 1,401 ▲4 | 4.31 ▲0.10 | 102.47 ▲3.37 | 46.87 ▼1.63 |
Menu Swapper /wp-admin/options-general.php?page=menu-swapper | 913 | 2.04 | 23.72 | 39.43 |
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
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-swapper/includes/functions.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-swapper/includes/admin-page.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-swapper/includes/meta-box.php:23
- > PHP Fatal error
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 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
- Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line (
=== menu-swapper ===
)
menu-swapper/menu-swapper.php 92% from 13 tests
The main PHP script in "Menu Swapper" version 1.2 is automatically included on every request by WordPress
You should first fix the following items:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected362 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 87 | 59 | 290 |
CSS | 1 | 4 | 0 | 46 |
JavaScript | 1 | 10 | 1 | 26 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.53 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 1 | 100.00% |
Methods | 4 | |
▷ Static methods | 1 | 25.00% |
▷ Public methods | 2 | 50.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 50.00% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 7 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected