Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▼1.21MB] [CPU: ▼331.42ms] Passed 4 tests
A check of server-side resources used by Add Ribbon Shortcode
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.05 | 54.94 ▲3.84 |
Dashboard /wp-admin | 3.11 ▼0.29 | 18.00 ▼14.04 |
Posts /wp-admin/edit.php | 3.11 ▼0.53 | 18.36 ▼17.20 |
Add New Post /wp-admin/post-new.php | 3.11 ▼3.86 | 17.13 ▼1,286.61 |
Media Library /wp-admin/upload.php | 3.11 ▼0.18 | 17.01 ▼7.84 |
Add Ribbon /wp-admin/tools.php?page=add_ribbon_info | 3.13 | 18.43 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options |
---|
recovery_mode_email_last_sent |
Browser metrics Passed 4 tests
A check of browser resources used by Add Ribbon Shortcode
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,770 ▲16 | 16.27 ▲0.62 | 6.63 ▲0.36 | 2.34 ▼0.15 |
Dashboard /wp-admin | 2,894 ▲33 | 6.14 ▼0.02 | 119.95 ▼17.79 | 154.78 ▼2.72 |
Posts /wp-admin/edit.php | 2,693 ▲5 | 3.23 ▼0.01 | 64.44 ▲0.30 | 142.37 ▼4.64 |
Add New Post /wp-admin/post-new.php | 1,720 ▼53 | 21.83 ▲0.61 | 449.35 ▼30.28 | 160.94 ▲0.14 |
Media Library /wp-admin/upload.php | 1,706 ▲8 | 5.53 ▲0.00 | 158.78 ▲8.47 | 190.86 ▲1.60 |
Add Ribbon /wp-admin/tools.php?page=add_ribbon_info | 1,211 | 1.99 | 37.97 | 100.07 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 validation failed for this plugin
- > User notice in wp-includes/functions.php+5768
add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- Zombie WordPress options were found after uninstall: 1 option
- recovery_mode_email_last_sent
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/tools.php?page=add_ribbon_info
- > User notice in wp-includes/functions.php+5768
add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- > GET request to /wp-admin/tools.php?page=add_ribbon_info
- > Error in wp-content/plugins/add-ribbon/templates/add_ribbon_dashboard.php+112
Uncaught Error: Class 'SherkCPTDisplays' not found in wp-content/plugins/add-ribbon/templates/add_ribbon_dashboard.php:112
Stack trace:
#0 wp-content/plugins/add-ribbon/includes/AddRibbonMenu.php(25): include()
#1 wp-includes/class-wp-hook.php(307): AddRibbonMenu->add_ribbon_menu_page()
#2 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(474): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 wp-admin/tools.php(40): require_once('/var/www/wordpr...')
#6 {main}
thrown
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
Almost there! Just fix the following items
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/add-ribbon/includes/AddRibbonShortcode.php:16
- > PHP Fatal error
Uncaught Error: Class 'SherkCPTDisplays' not found in wp-content/plugins/add-ribbon/templates/add_ribbon_dashboard.php:112
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-ribbon/includes/AddRibbonCssJsScripts.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-ribbon/includes/AddRibbonMenu.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/add-ribbon/includes/AddRibbonShortcode.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: ribbon, shortcode, ribbon generator, cssportal ribbon
add-ribbon/add_ribbon.php 85% from 13 tests
"Add Ribbon Shortcode" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 244 characters long)
- Main file name: Name the main plugin file the same as the plugin slug ("add-ribbon.php" instead of "add_ribbon.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected336 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 88 | 83 | 223 |
CSS | 1 | 18 | 9 | 113 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.05 |
Average class complexity | 1.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.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 | 10 | |
▷ Static methods | 2 | 20.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/logo.png | 49.81KB | 14.78KB | ▼ 70.33% |
assets/images/controls.png | 2.74KB | 1.42KB | ▼ 48.29% |