Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▼10.78ms] Passed 4 tests
An overview of server-side resources used by WooCommerce Product Badge
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 44.65 ▲7.36 |
Dashboard /wp-admin | 3.31 ▲0.00 | 46.84 ▼22.61 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.88 ▼12.37 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 83.54 ▼10.10 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.15 ▲1.97 |
Server storage [IO: ▲1.11MB] [DB: ▲0.07MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for WooCommerce Product Badge
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.18 ▼0.48 | 1.77 ▲0.14 | 44.97 ▼4.31 |
Dashboard /wp-admin | 2,192 ▲15 | 5.55 ▼0.02 | 89.79 ▼5.60 | 39.60 ▼3.09 |
Posts /wp-admin/edit.php | 2,100 ▼3 | 1.96 ▼0.04 | 35.39 ▼6.24 | 37.82 ▲2.68 |
Add New Post /wp-admin/post-new.php | 1,526 ▼4 | 23.56 ▲0.51 | 682.20 ▲23.66 | 66.00 ▲10.08 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.19 ▼0.21 | 93.47 ▼4.19 | 42.83 ▼3.26 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Looking good! No server-side errors or output on direct access of PHP files
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 93% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
- Screenshots: Please add images for these screenshots: #1 (The WooCommerce > Product Badge option page.), #2 (The shop page with product badges.), #3 (The product page with Sale and New badge.), #4 (The mobile layout for product page.), #5 (The product badge/label shown "After Product Price" as Display Position option.)
woocommerce-product-badge/wc-product-badge.php 92% from 13 tests
Analyzing the main PHP file in "WooCommerce Product Badge" version 1.0.4
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-product-badge.php" instead of "wc-product-badge.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected551 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 84 | 61 | 279 |
PO File | 2 | 58 | 112 | 156 |
CSS | 2 | 16 | 0 | 113 |
Markdown | 1 | 1 | 0 | 3 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 32.00 |
▷ Minimum class complexity | 32.00 |
▷ Maximum class complexity | 32.00 |
Average method complexity | 4.10 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 1.08MB with 0.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-4.png | 32.39KB | 12.22KB | ▼ 62.26% |
screenshot-1.png | 64.37KB | 22.08KB | ▼ 65.70% |
screenshot-3.png | 465.10KB | 160.33KB | ▼ 65.53% |
screenshot-2.png | 141.01KB | 50.78KB | ▼ 63.99% |
screenshot-5.png | 397.98KB | 136.18KB | ▼ 65.78% |