Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼9.44ms] Passed 4 tests
Analyzing server-side resources used by Simple On/Off Switch
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.03 | 32.86 ▼15.37 |
Dashboard /wp-admin | 3.29 ▼0.02 | 37.66 ▼10.10 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 40.49 ▼4.60 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 78.34 ▼7.68 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 35.04 ▲0.47 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 9 new options
New WordPress options |
---|
can_compress_scripts |
simpleswitch_offvalue |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
simpleswitch |
simpleswitch_onvalue |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Simple On/Off Switch
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,875 ▲129 | 13.34 ▼1.03 | 4.00 ▲1.92 | 38.43 ▲0.62 |
Dashboard /wp-admin | 2,281 ▲93 | 4.86 ▲0.00 | 113.22 ▲5.12 | 39.64 ▼1.14 |
Posts /wp-admin/edit.php | 2,086 ▼3 | 2.05 ▲0.04 | 39.01 ▲2.65 | 39.24 ▲3.89 |
Add New Post /wp-admin/post-new.php | 1,534 ▲1 | 23.40 ▲0.29 | 591.13 ▼114.21 | 53.71 ▼0.48 |
Media Library /wp-admin/upload.php | 1,391 ▼0 | 4.19 ▼0.02 | 101.92 ▲0.45 | 41.11 ▼1.79 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin did not uninstall successfully, leaving 9 options in the database
- simpleswitch_onvalue
- simpleswitch
- simpleswitch_offvalue
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 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
Please take a closer look at the following
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_option() in wp-content/plugins/simple-onoff-switch/simple-on-off-switch.php:29
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: dashboard, select, switch, widgets, admin
simple-onoff-switch/simple-on-off-switch.php 92% from 13 tests
The main PHP script in "Simple On/Off Switch" version 1.2 is automatically included on every request by WordPress
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-onoff-switch.php" instead of "simple-on-off-switch.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin64 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 16 | 23 | 64 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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 images were found in this plugin