Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼5.95ms] Passed 4 tests
Server-side resources used by Product Labels For WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 37.54 ▼5.51 |
Dashboard /wp-admin | 3.32 ▲0.02 | 50.28 ▲1.68 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 44.34 ▼5.36 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 92.70 ▼10.09 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 33.72 ▼2.85 |
Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Product Labels For WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲79 | 13.29 ▼1.01 | 1.56 ▼0.26 | 40.78 ▼7.93 |
Dashboard /wp-admin | 2,220 ▲35 | 5.80 ▼0.02 | 97.10 ▼2.91 | 37.01 ▼7.91 |
Posts /wp-admin/edit.php | 2,103 ▲14 | 2.05 ▲0.04 | 37.07 ▲2.82 | 33.46 ▼0.72 |
Add New Post /wp-admin/post-new.php | 1,529 ▲15 | 23.24 ▲5.63 | 649.19 ▲15.06 | 50.30 ▲2.73 |
Media Library /wp-admin/upload.php | 1,402 ▲11 | 4.24 ▲0.04 | 94.65 ▼0.51 | 40.48 ▼1.85 |
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
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
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
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/product-badges/templates/badge.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: product stickers, product labels, badge for sale, product badges, woocommerce...
product-badges/product-badges.php Passed 13 tests
The principal PHP file in "Product Labels For WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
69 characters long description:
Allows to create beautiful product labels for your WooCommerce store.
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
Success! There were no dangerous files found in this plugin1,306 lines of code in 31 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 25 | 260 | 170 | 929 |
JavaScript | 3 | 45 | 13 | 202 |
CSS | 3 | 35 | 10 | 175 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 5.54 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 2.07 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 13 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 55 | |
▷ Static methods | 6 | 10.91% |
▷ Public methods | 52 | 94.55% |
▷ Protected methods | 1 | 1.82% |
▷ Private methods | 2 | 3.64% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 4 | 80.00% |
▷ Class constants | 1 | 20.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/assets/images/circle.png | 1.55KB | 0.65KB | ▼ 57.70% |
admin/assets/images/square.png | 0.31KB | 0.09KB | ▼ 70.98% |