Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.53MB] [CPU: ▼5.55ms] Passed 4 tests
This is a short check of server-side resources used by Product Labels For Woocommerce (Sale Badges)
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.94 ▲0.48 | 43.09 ▼9.04 |
Dashboard /wp-admin | 3.89 ▲0.59 | 53.10 ▼0.38 |
Posts /wp-admin/edit.php | 3.94 ▲0.58 | 54.81 ▼0.03 |
Add New Post /wp-admin/post-new.php | 6.44 ▲0.55 | 100.33 ▼12.74 |
Media Library /wp-admin/upload.php | 3.75 ▲0.52 | 44.97 ▲9.01 |
Server storage [IO: ▲1.64MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
acoplw_version |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Product Labels For Woocommerce (Sale Badges)
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 13.38 ▼0.93 | 1.91 ▲0.14 | 43.23 ▲0.03 |
Dashboard /wp-admin | 2,224 ▲21 | 5.86 ▼0.04 | 100.19 ▼16.24 | 39.33 ▼9.45 |
Posts /wp-admin/edit.php | 2,103 ▲6 | 2.01 ▲0.01 | 41.01 ▲2.18 | 35.13 ▼0.63 |
Add New Post /wp-admin/post-new.php | 1,548 ▲2 | 23.19 ▼0.12 | 674.49 ▲20.20 | 57.70 ▲5.03 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.27 ▲0.03 | 106.26 ▲1.22 | 47.40 ▲2.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- This plugin did not uninstall successfully, leaving 7 options in the database
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- acoplw_version
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 3× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/aco-product-labels-for-woocommerce/includes/views/admin-lists.php
- > /wp-content/plugins/aco-product-labels-for-woocommerce/includes/views/admin-root.php
- > /wp-content/plugins/aco-product-labels-for-woocommerce/includes/views/admin-settings.php
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
Use of undefined constant ACOPLW_TOKEN - assumed 'ACOPLW_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-product-labels-for-woocommerce/includes/views/admin-lists.php on line 1
- > PHP Warning
Use of undefined constant ACOPLW_TOKEN - assumed 'ACOPLW_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-product-labels-for-woocommerce/includes/views/admin-root.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/aco-product-labels-for-woocommerce/start.php:24
- > PHP Warning
Use of undefined constant ACOPLW_TOKEN - assumed 'ACOPLW_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-product-labels-for-woocommerce/includes/views/admin-settings.php on line 1
- > PHP Warning
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 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
- Donate link: Invalid url: ""
aco-product-labels-for-woocommerce/start.php 85% from 13 tests
The principal PHP file in "Product Labels For Woocommerce (Sale Badges)" v. 1.5.2 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("aco-product-labels-for-woocommerce.php" instead of "start.php")
- Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "4.4")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,457 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 623 | 531 | 2,199 |
CSS | 2 | 21 | 12 | 421 |
JSON | 2 | 0 | 0 | 358 |
PO File | 1 | 141 | 141 | 296 |
JavaScript | 3 | 15 | 41 | 154 |
XML | 1 | 0 | 0 | 21 |
SVG | 1 | 0 | 0 | 8 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
Please tend to the following items
- Please reduce cyclomatic complexity of methods to less than 100 (currently 172)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.75 |
Average class complexity | 136.60 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 413.00 |
Average method complexity | 9.53 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 172.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 78 | |
▷ Static methods | 5 | 6.41% |
▷ Public methods | 77 | 98.72% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.28% |
Functions | 8 | |
▷ Named functions | 3 | 37.50% |
▷ Anonymous functions | 5 | 62.50% |
Constants | 14 | |
▷ Global constants | 14 | 100.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
21 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/cssbadges/bsfifteen.png | 1.79KB | 0.50KB | ▼ 72.10% |
assets/images/cssbadges/bseight.png | 3.49KB | 1.47KB | ▼ 57.83% |
assets/images/ad_bg.png | 17.05KB | 19.03KB | 0.00% |
assets/images/cssbadges/bsone.png | 1.25KB | 0.66KB | ▼ 46.75% |
assets/images/delete.png | 0.65KB | 0.74KB | 0.00% |