Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
- The plugin cannot be installed
- > Warning in wp-content/plugins/menu-badge/menu-badger.php+35
Use of undefined constant customImage - assumed 'customImage' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼2.50MB] [CPU: ▼340.40ms] Passed 4 tests
A check of server-side resources used by Menu Badger
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.87 ▼1.64 | 4.30 ▼47.45 |
Dashboard /wp-admin | 1.89 ▼1.52 | 3.84 ▼29.38 |
Posts /wp-admin/edit.php | 1.89 ▼1.75 | 4.83 ▼31.13 |
Add New Post /wp-admin/post-new.php | 1.89 ▼5.08 | 3.49 ▼1,253.64 |
Media Library /wp-admin/upload.php | 1.89 ▼1.40 | 3.59 ▼19.89 |
Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Menu Badger
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,088 ▲366 | 18.05 ▲2.27 | 9.00 ▲1.71 | 2.26 ▼0.12 |
Dashboard /wp-admin | 3,110 ▲249 | 8.19 ▲1.98 | 141.90 ▲6.00 | 168.34 ▲4.90 |
Posts /wp-admin/edit.php | 2,937 ▲246 | 4.68 ▲1.44 | 81.17 ▲13.73 | 159.71 ▲4.16 |
Add New Post /wp-admin/post-new.php | 1,680 ▲19 | 16.46 ▲0.47 | 395.39 ▼22.14 | 201.23 ▲47.55 |
Media Library /wp-admin/upload.php | 1,722 ▲24 | 5.69 ▲0.15 | 109.73 ▼29.47 | 197.90 ▲12.15 |
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
It is recommended to fix the following
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5768
wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test
SRP Passed 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
Congratulations! This plugin passed the SRP test
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Plugin Name: Please specify the plugin name on the first line (
=== menu-badge ===
)
menu-badge/menu-badger.php 85% from 13 tests
"Menu Badger" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("menu-badge.php" instead of "menu-badger.php")
- 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected323 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 64 | 30 | 186 |
JavaScript | 4 | 31 | 37 | 112 |
CSS | 2 | 3 | 0 | 25 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.13 |
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 | 8 | |
▷ Named functions | 8 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/badges/new-green.png | 22.61KB | 8.29KB | ▼ 63.33% |
img/new-red-ico.png | 3.57KB | 0.99KB | ▼ 72.12% |
img/badges/apple-number-2.png | 5.49KB | 3.03KB | ▼ 44.84% |
img/badges/apple-number-3.png | 3.91KB | 2.49KB | ▼ 36.33% |
img/badges/new-red.png | 22.48KB | 7.62KB | ▼ 66.11% |