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: ▲2.57MB] [CPU: ▲9.90ms] Passed 4 tests
A check of server-side resources used by Product Sort and Display for WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 6.03 ▲2.57 | 52.83 ▲12.05 |
Dashboard /wp-admin | 5.85 ▲2.55 | 60.49 ▲8.70 |
Posts /wp-admin/edit.php | 5.97 ▲2.61 | 60.79 ▲4.16 |
Add New Post /wp-admin/post-new.php | 8.52 ▲2.63 | 108.87 ▲18.70 |
Media Library /wp-admin/upload.php | 5.78 ▲2.54 | 50.89 ▲14.69 |
Sort & Display /wp-admin/admin.php?page=wc-sort-display | 5.86 | 64.32 |
Server storage [IO: ▲2.45MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 151 new files
Database: no new tables, 145 new options
New WordPress options |
---|
psad_es_category_item_link_align |
widget_recent-posts |
psad_es_products_bt_shadow |
wc_psad_clean_on_deletion |
psad_count_meta_padding_top |
psad_shop_product_per_page |
psad_es_products_bt_padding_lr |
psad_es_top_products_bt_bg_to |
psad_top_product_per_page |
psad_es_category_link_margin_bottom |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Product Sort and Display for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,794 ▲7 | 14.27 ▼0.12 | 1.58 ▼0.38 | 36.84 ▼7.50 |
Dashboard /wp-admin | 2,197 ▲19 | 5.58 ▼0.14 | 101.52 ▼11.93 | 42.48 ▼3.83 |
Posts /wp-admin/edit.php | 2,102 ▼1 | 1.94 ▼0.03 | 40.15 ▲1.93 | 35.79 ▼0.43 |
Add New Post /wp-admin/post-new.php | 1,528 ▼3 | 23.18 ▲0.38 | 615.08 ▼2.29 | 56.69 ▲8.77 |
Media Library /wp-admin/upload.php | 1,402 ▼1 | 4.24 ▲0.05 | 96.52 ▼0.15 | 43.22 ▼2.49 |
Sort & Display /wp-admin/admin.php?page=wc-sort-display | 3,101 | 4.74 | 117.34 | 109.14 |
Uninstaller [IO: ▲0.03MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 144 options
- psad_es_shop_link_font_hover_color
- psad_es_category_bt_margin_bottom
- psad_es_shop_bt_font
- psad_es_shop_bt_margin_top
- psad_es_category_item_link_font_hover_color
- psad_es_products_bt_margin_bottom
- psad_es_products_bt_align
- psad_es_products_bt_type
- psad_es_category_link_margin_bottom
- psad_es_category_bt_font
- ...
Smoke tests 50% 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 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
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/woocommerce-product-sort-and-display/templates/customized_style.php
- 3× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-product-sort-and-display/admin/wc-psad-init.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/woocommerce-product-sort-and-display/wc-psad.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woocommerce-product-sort-and-display/templates/customized_style.php:109
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 93% 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 product sort, woocommerce, woocommerce product display, woocommerce shop page, woocommerce products
woocommerce-product-sort-and-display/wc-psad.php 85% from 13 tests
Analyzing the main PHP file in "Product Sort and Display for WooCommerce" version 2.4.1
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-product-sort-and-display.php" instead of "wc-psad.php")
- Description: Please keep the plugin description shorter than 140 characters (currently 285 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected42,325 lines of code in 94 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 1 | 0 | 0 | 13,203 |
JavaScript | 31 | 2,149 | 1,649 | 12,887 |
PHP | 30 | 2,435 | 2,197 | 11,651 |
CSS | 22 | 315 | 154 | 3,395 |
LESS | 5 | 75 | 26 | 642 |
PO File | 1 | 194 | 274 | 471 |
SVG | 3 | 3 | 0 | 47 |
HTML | 1 | 2 | 0 | 29 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 410)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 78.58 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 801.00 |
Average method complexity | 5.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 410.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 26 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 26 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 421 | |
▷ Static methods | 23 | 5.46% |
▷ Public methods | 252 | 59.86% |
▷ Protected methods | 141 | 33.49% |
▷ Private methods | 28 | 6.65% |
Functions | 14 | |
▷ Named functions | 12 | 85.71% |
▷ Anonymous functions | 2 | 14.29% |
Constants | 20 | |
▷ Global constants | 15 | 75.00% |
▷ Class constants | 5 | 25.00% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
33 PNG files occupy 0.16MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/includes/uploader/delete.png | 0.13KB | 0.13KB | 0.00% |
admin/assets/images/help.png | 0.30KB | 0.32KB | 0.00% |
admin/assets/images/slider-handle.png | 2.67KB | 1.71KB | ▼ 36.00% |
admin/assets/images/slider-bg-range.png | 1.06KB | 0.14KB | ▼ 86.65% |
admin/assets/images/ico-delete.png | 0.13KB | 0.13KB | 0.00% |