Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼6.35ms] Passed 4 tests
This is a short check of server-side resources used by Product Sticker
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 34.29 ▼1.31 |
Dashboard /wp-admin | 3.31 ▼0.04 | 43.50 ▼18.66 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 44.25 ▼0.05 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 92.02 ▼3.38 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.10 ▼2.05 |
Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Product Sticker
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.35 ▲0.01 | 1.76 ▲0.07 | 42.54 ▲0.80 |
Dashboard /wp-admin | 2,198 ▲18 | 5.53 ▼0.16 | 85.36 ▼5.05 | 37.12 ▼3.47 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.97 ▼0.06 | 37.31 ▲3.68 | 30.84 ▼7.15 |
Add New Post /wp-admin/post-new.php | 1,537 ▲11 | 18.45 ▼4.66 | 625.62 ▼79.87 | 62.65 ▲8.94 |
Media Library /wp-admin/upload.php | 1,403 ▲6 | 4.22 ▼0.03 | 96.81 ▼7.07 | 41.95 ▼4.82 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-sticker/includes/admin/sps-content-tab-general.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-sticker/includes/admin/sps-content-tab-sale.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-sticker/includes/admin/sps-content-tab-soldout.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-sticker/includes/admin/sps-content-tab-bestseller.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-sticker/includes/admin/sps-content-tab-new.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: stickers, woocommerce stickers, product badge, badge, product stickers...
product-sticker/product-sticker.php Passed 13 tests
The entry point to "Product Sticker" version 1.0.0 is a PHP file that has certain tags in its header comment area
32 characters long description:
Product stickers for WooCommerce
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin799 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 85 | 26 | 617 |
CSS | 1 | 8 | 4 | 107 |
PO File | 1 | 29 | 79 | 75 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 10.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 29.00 |
Average method complexity | 2.87 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 20.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 2 | 66.67% |
Methods | 15 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 11 | 73.33% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 26.67% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
13 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/public/css/image/star/sticker-bestseller.png | 1.84KB | 1.89KB | 0.00% |
includes/public/css/image/ribbon/sticker-soldout.png | 4.78KB | 3.40KB | ▼ 28.87% |
includes/public/css/image/diagonal/sticker-sale.png | 21.40KB | 2.15KB | ▼ 89.94% |
includes/admin/image/placeholder.png | 16.24KB | 1.94KB | ▼ 88.03% |
includes/public/css/image/diagonal/diagonal-bestseller.png | 19.04KB | 2.19KB | ▼ 88.52% |