Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.22MB] [CPU: ▼294.40ms] Passed 4 tests
A check of server-side resources used by Maintenance Switch
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.74 ▲0.22 | 59.55 ▲9.51 |
Dashboard /wp-admin | 3.64 ▲0.23 | 43.01 ▲9.92 |
Posts /wp-admin/edit.php | 3.86 ▲0.22 | 39.57 ▲1.47 |
Add New Post /wp-admin/post-new.php | 7.17 ▲0.19 | 96.51 ▼1,191.34 |
Media Library /wp-admin/upload.php | 3.58 ▲0.29 | 27.16 ▲2.77 |
Maintenance Switch /wp-admin/options-general.php?page=maintenance-switch | 3.56 | 26.10 |
Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] 67% from 3 tests
How much does this plugin use your filesystem and database?
Please fix the following
- There were 1 file (1.61KB) illegally modified outside of "wp-content/plugins/maintenance-switch/" and "wp-content/uploads/"
- (new file) wp-content/maintenance.php
Filesystem: 35 new files
Database: no new tables, 3 new options
New WordPress options |
---|
maintenance_switch_status |
maintenance_switch_settings |
maintenance_switch_version |
Browser metrics Passed 4 tests
An overview of browser requirements for Maintenance Switch
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,942 ▲188 | 16.59 ▲0.81 | 10.17 ▲4.25 | 2.80 ▲0.29 |
Dashboard /wp-admin | 2,907 ▲46 | 6.09 ▼0.13 | 118.83 ▼21.39 | 156.27 ▼9.13 |
Posts /wp-admin/edit.php | 2,710 ▲25 | 3.25 ▲0.01 | 63.96 ▼2.21 | 141.55 ▼4.56 |
Add New Post /wp-admin/post-new.php | 1,681 ▲20 | 16.43 ▲0.40 | 432.15 ▲11.17 | 154.65 ▼3.39 |
Media Library /wp-admin/upload.php | 1,721 ▲23 | 5.56 ▲0.04 | 139.07 ▼12.34 | 180.75 ▼3.27 |
Maintenance Switch /wp-admin/options-general.php?page=maintenance-switch | 1,843 | 5.09 | 122.49 | 147.24 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin does not fully uninstall, leaving 3 options in the database
- maintenance_switch_status
- maintenance_switch_settings
- maintenance_switch_version
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/maintenance-switch/public/views/maintenance-switch-public-display.php
- > /wp-content/plugins/maintenance-switch/templates/maintenance.php
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/maintenance-switch/includes/config.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
- Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
maintenance-switch/maintenance-switch.php Passed 13 tests
The main PHP script in "Maintenance Switch" version 1.5.2 is automatically included on every request by WordPress
100 characters long description:
Customize easily and switch in one-click to (native) maintenance mode from your backend or frontend.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected5,396 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 4,103 |
PHP | 15 | 366 | 1,026 | 887 |
Sass | 2 | 45 | 2 | 176 |
PO File | 1 | 58 | 81 | 131 |
JavaScript | 4 | 26 | 39 | 97 |
CSS | 3 | 0 | 4 | 2 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 15.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 71.00 |
Average method complexity | 2.35 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 83 | |
▷ Static methods | 2 | 2.41% |
▷ Public methods | 78 | 93.98% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 6.02% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 9 | 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
PNG images were not found in this plugin