Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- Install procedure had errors
- > Warning in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-functions.php+993
count(): Parameter must be an array or an object that implements Countable
Server metrics [RAM: ▼0.84MB] [CPU: ▼31.58ms] Passed 4 tests
A check of server-side resources used by Next Product Labels & Badges for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.40 ▼0.06 | 27.29 ▼16.31 |
Dashboard /wp-admin | 3.11 ▼0.20 | 26.73 ▼28.80 |
Posts /wp-admin/edit.php | 3.11 ▼0.25 | 26.38 ▼20.79 |
Add New Post /wp-admin/post-new.php | 3.11 ▼2.78 | 29.67 ▼60.41 |
Media Library /wp-admin/upload.php | 3.11 ▼0.12 | 27.13 ▼5.68 |
Set labels /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_label | 3.11 | 28.71 |
Set badges /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_badge | 3.11 | 27.28 |
Next Labels /wp-admin/admin.php?page=wcplb-acp | 3.11 | 29.72 |
General Settings /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_settings | 3.11 | 25.30 |
Server storage [IO: ▲3.69MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 71 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-posts |
wcplbCurrentVersion |
wcplbCurrentType |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Next Product Labels & Badges for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,842 ▲107 | 13.22 ▼1.15 | 1.77 ▼0.21 | 43.04 ▼10.03 |
Dashboard /wp-admin | 2,233 ▲45 | 5.80 ▼0.08 | 110.45 ▼5.22 | 54.76 ▲10.96 |
Posts /wp-admin/edit.php | 2,128 ▲36 | 1.98 ▼0.01 | 33.69 ▼2.18 | 31.64 ▼2.42 |
Add New Post /wp-admin/post-new.php | 1,549 ▲13 | 23.23 ▼0.27 | 765.64 ▲85.37 | 63.06 ▲4.81 |
Media Library /wp-admin/upload.php | 1,418 ▲30 | 4.14 ▼0.06 | 112.58 ▲10.09 | 44.62 ▼0.44 |
Set labels /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_label | 1,283 | 1.85 | 28.55 | 60.60 |
Set badges /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_badge | 1,349 | 1.85 | 25.78 | 38.00 |
Next Labels /wp-admin/admin.php?page=wcplb-acp | 944 | 1.84 | 26.34 | 32.44 |
General Settings /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_settings | 947 | 1.84 | 25.61 | 35.43 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Uninstall procedure had uncaught errors
- > Warning in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-functions.php+255
count(): Parameter must be an array or an object that implements Countable
- This plugin does not fully uninstall, leaving 8 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- wcplbCurrentType
- widget_recent-posts
- wcplbCurrentVersion
- db_upgraded
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
- 8 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_settings
- > Warning in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-acp-page.php+246
count(): Parameter must be an array or an object that implements Countable
- 16 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_settings
- > Notice in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-acp-page.php+250
Trying to get property 'slug' of non-object
- 8 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_settings
- > Notice in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-acp-page.php+251
Trying to get property 'name' of non-object
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_settings
- > Notice in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-acp-page.php+303
Undefined index: section
- 13 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_badge
- > Notice in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php+75
Undefined variable: image
- 13 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_badge
- > Warning in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php+75
imagecolorallocate() expects parameter 1 to be resource, null given
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_badge
- > Warning in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-draw-image.php+284
imagettfbbox(): Could not read font
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_badge
- > Notice in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-draw-image.php+285
Trying to access array offset on value of type bool
- > GET request to /wp-admin/admin.php?page=wcplb-acp&tab=wcplb_set_badge
- > Warning in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-draw-image.php+290
imagettftext(): Could not read font
- > GET request to /wp-admin/admin.php?page=wcplb-acp
- > Notice in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-acp-page.php+301
Undefined index: tab
SRP 0% 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
Please take a closer look at the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php
- 54× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: image in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 64
- > PHP Notice
Undefined variable: opt_BadgeType in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 116
- > PHP Notice
Undefined variable: opt_BadgeName_ in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 120
- > PHP Warning
imagecolorallocate() expects parameter 1 to be resource, null given in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 65
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/next-wc-product-labels-badges/next-wc-product-labels-badges.php:17
- > PHP Warning
imagecolorallocate() expects parameter 1 to be resource, null given in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 64
- > PHP Warning
imagecolorallocate() expects parameter 1 to be resource, null given in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 68
- > PHP Notice
Undefined variable: opt_BadgeType in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 182
- > PHP Warning
imagecolorallocate() expects parameter 1 to be resource, null given in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-show-image-badge.inc.php on line 72
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/next-wc-product-labels-badges/includes/wcplb-align-shop.inc.php:2
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
- Requires php: Version not formatted correctly
- Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
next-wc-product-labels-badges/next-wc-product-labels-badges.php 92% from 13 tests
The primary PHP file in "Next Product Labels & Badges for WooCommerce" version 1.4.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,046 lines of code in 25 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 21 | 502 | 15 | 3,602 |
PO File | 1 | 197 | 296 | 238 |
CSS | 3 | 20 | 5 | 206 |
PHP code Passed 2 tests
An short overview of 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.22 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 54 | |
▷ Named functions | 54 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icon.png | 10.41KB | 0.98KB | ▼ 90.58% |
images/badgeShop_Victory.png | 2.08KB | 0.99KB | ▼ 52.51% |
images/labelShop_Label.png | 1.77KB | 0.85KB | ▼ 51.76% |
images/labels-show.png | 0.71KB | 0.87KB | 0.00% |
images/labelShop_Circle.png | 1.17KB | 0.53KB | ▼ 54.81% |