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
Installer ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼152.62ms] Passed 4 tests
A check of server-side resources used by WP Simple Maintenance & Under Construction Mode
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.01 ▲0.17 | 30.17 ▲3.75 |
Dashboard /wp-admin | 3.25 ▲0.19 | 28.68 ▼14.82 |
Posts /wp-admin/edit.php | 3.30 ▲0.18 | 35.27 ▼23.84 |
Add New Post /wp-admin/post-new.php | 5.25 ▼0.19 | 81.62 ▼568.01 |
Media Library /wp-admin/upload.php | 3.25 ▲0.25 | 30.70 ▼3.79 |
WP Simple Maintenance Mode /wp-admin/options-general.php?page=wp-simple-maintenance-mode | 3.23 | 31.72 |
Activate /wp-admin/admin.php?page=wp-simple-maintenance-mode-optin | 3.23 | 27.17 |
Server storage [IO: ▲0.72MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for WP Simple Maintenance & Under Construction Mode
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,754 ▲117 | 16.32 ▲0.76 | 9.22 ▼0.33 | 54.98 ▲5.45 |
Dashboard /wp-admin | 3,004 ▲78 | 5.91 ▼0.29 | 142.27 ▼24.70 | 113.03 ▼10.77 |
Posts /wp-admin/edit.php | 2,770 ▲31 | 2.70 ▲0.01 | 68.51 ▲0.65 | 90.48 ▼2.62 |
Add New Post /wp-admin/post-new.php | 1,640 ▼2,066 | 21.30 ▲2.05 | 281.56 ▼193.23 | 115.18 ▲5.24 |
Media Library /wp-admin/upload.php | 1,779 ▼28 | 5.01 ▼0.02 | 168.25 ▲13.96 | 125.86 ▼3.54 |
WP Simple Maintenance Mode /wp-admin/options-general.php?page=wp-simple-maintenance-mode | 1,129 | 2.09 | 61.99 | 134.88 |
Activate /wp-admin/admin.php?page=wp-simple-maintenance-mode-optin | 1,114 | 2.11 | 61.12 | 114.93 |
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
The following items require your attention
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5663
wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wp-simple-maintenance-mode-optin
- > User notice in wp-includes/functions.php+5663
WP_Admin_Bar::add_node was called incorrectly. The menu ID should not be empty. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-simple-maintenance-mode
- > Notice in wp-content/plugins/wp-simple-maintenance-mode/class/class.main_ui.php+65
Undefined index: tab
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
Please fix the following
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
require_once(): Failed opening required 'MYPLUGIN__PLUGIN_URLclass/class.db.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-simple-maintenance-mode/templates/page1.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wp-simple-maintenance-mode/assets/include/create_optin_page.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-simple-maintenance-mode/index.php:13
- > PHP Warning
require_once(MYPLUGIN__PLUGIN_URLclass/class.db.php): failed to open stream: No such file or directory in wp-content/plugins/wp-simple-maintenance-mode/templates/page1.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/wp-simple-maintenance-mode/assets/include/deactivate_modal.php:2
- > PHP Warning
Use of undefined constant MYPLUGIN__PLUGIN_URL - assumed 'MYPLUGIN__PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-simple-maintenance-mode/templates/page1.php on line 2
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Tags: There are too many tags (12 tag instead of maximum 10)
wp-simple-maintenance-mode/index.php 92% from 13 tests
The main file in "WP Simple Maintenance & Under Construction Mode" v. 1.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("wp-simple-maintenance-mode.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin2,448 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 202 | 73 | 2,390 |
JavaScript | 2 | 11 | 0 | 56 |
CSS | 2 | 0 | 6 | 2 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 50.00 |
▷ Minimum class complexity | 36.00 |
▷ Maximum class complexity | 71.00 |
Average method complexity | 5.17 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 49.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 47 | |
▷ Static methods | 3 | 6.38% |
▷ Public methods | 46 | 97.87% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 2.13% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 10 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.37MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/vk-icon.png | 28.43KB | 11.66KB | ▼ 59.00% |
assets/img/linkedin-icon.png | 15.46KB | 6.36KB | ▼ 58.86% |
assets/img/twitter-icon.png | 13.38KB | 6.14KB | ▼ 54.11% |
assets/img/facebook-icon.png | 14.66KB | 5.96KB | ▼ 59.35% |
assets/img/google-plus-icon.png | 20.60KB | 8.03KB | ▼ 61.04% |