Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼3.98ms] Passed 4 tests
Analyzing server-side resources used by YITH WooCommerce Badge Management
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 36.12 ▼4.57 |
Dashboard /wp-admin | 3.31 ▲0.01 | 46.26 ▼5.93 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 50.34 ▲3.16 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 96.66 ▼3.02 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 38.16 ▼2.41 |
Server storage [IO: ▲5.05MB] [DB: ▲0.07MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 374 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
yit_recently_activated |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for YITH WooCommerce Badge Management
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,796 ▲9 | 14.14 ▼0.18 | 1.67 ▼0.41 | 37.32 ▼6.44 |
Dashboard /wp-admin | 2,204 ▲27 | 5.69 ▲0.11 | 99.11 ▼9.46 | 43.29 ▼0.31 |
Posts /wp-admin/edit.php | 2,107 ▲4 | 2.00 ▼0.03 | 41.08 ▲1.57 | 36.85 ▼3.45 |
Add New Post /wp-admin/post-new.php | 1,536 ▲9 | 23.29 ▲0.16 | 679.03 ▲15.64 | 48.12 ▼7.76 |
Media Library /wp-admin/upload.php | 1,406 ▲6 | 4.24 ▲0.03 | 115.15 ▲1.63 | 49.42 ▲1.54 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- yit_recently_activated
- db_upgraded
- theysaidso_admin_options
- 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
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/yith-woocommerce-badges-management/views/fields/badge-library.php on line 11
- > PHP Notice
Undefined variable: badge in wp-content/plugins/yith-woocommerce-badges-management/views/badge-content.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/yith-woocommerce-badges-management/plugin-options/metaboxes/badge-metabox.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/yith-woocommerce-badges-management/views/metaboxes/badge-settings.php:21
- > PHP Fatal error
Uncaught Error: Class 'YITH_WCBM_Simple_Data_Store_CPT' not found in wp-content/plugins/yith-woocommerce-badges-management/includes/data-stores/class-yith-wcbm-badge-data-store-cpt.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/yith-woocommerce-badges-management/views/badges/image.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/yith-woocommerce-badges-management/views/fields/badge-library.php:23
- > PHP Warning
current() expects parameter 1 to be array, null given in wp-content/plugins/yith-woocommerce-badges-management/views/fields/badge-library.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/yith-woocommerce-badges-management/plugin-options/metaboxes/product-badge-metabox.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/yith-woocommerce-badges-management/views/badges/text.php:13
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: woocommerce, badges, products, badge, yith
yith-woocommerce-badges-management/init.php 77% from 13 tests
The entry point to "YITH WooCommerce Badge Management" version 3.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("yith-woocommerce-badges-management.php" instead of "init.php")
- Requires at least: Required version must be the same as the one declared in readme.txt ("6.2" instead of "8.1")
- Description: The description should be shorter than 140 characters (currently 214 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
Good job! No executable or dangerous file extensions detected57,753 lines of code in 303 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 198 | 3,226 | 7,131 | 17,861 |
JSON | 1 | 0 | 0 | 10,942 |
CSS | 22 | 1,824 | 284 | 10,081 |
JavaScript | 51 | 1,335 | 828 | 9,819 |
SVG | 24 | 0 | 1 | 4,703 |
PO File | 6 | 1,566 | 1,920 | 4,307 |
XML | 1 | 12 | 9 | 40 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 36.02 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 336.00 |
Average method complexity | 3.68 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 42.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 43 | |
▷ Abstract classes | 2 | 4.65% |
▷ Concrete classes | 41 | 95.35% |
▷ Final classes | 0 | 0.00% |
Methods | 547 | |
▷ Static methods | 65 | 11.88% |
▷ Public methods | 452 | 82.63% |
▷ Protected methods | 67 | 12.25% |
▷ Private methods | 28 | 5.12% |
Functions | 193 | |
▷ Named functions | 184 | 95.34% |
▷ Anonymous functions | 9 | 4.66% |
Constants | 33 | |
▷ Global constants | 27 | 81.82% |
▷ Class constants | 6 | 18.18% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
29 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
plugin-fw/assets/images/double-sidebar.png | 0.95KB | 0.12KB | ▼ 87.73% |
plugin-fw/assets/images/banner-premium.png | 10.78KB | 5.54KB | ▼ 48.66% |
plugin-fw/assets/css/jquery-ui/images/ui-icons_888888_256x240.png | 3.69KB | 4.18KB | 0.00% |
plugin-fw/assets/images/ui-icons_222222_256x240.png | 6.76KB | 4.17KB | ▼ 38.24% |
plugin-fw/assets/css/jquery-ui/images/ui-icons_454545_256x240.png | 3.69KB | 4.18KB | 0.00% |