67% woocommerce-products-filter

Code Review | HUSKY - Products Filter for WooCommerce Professional

WordPress plugin HUSKY - Products Filter for WooCommerce Professional scored67%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 1.3.4.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.9.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2014
  • Latest release: Oct 26, 2023
  • Number of updates: 488
  • Update frequency: every 6.7 days
  • Top authors: RealMag777 (100%)

Code review

54 tests

User reviews

287 reviews

Install metrics

100,000+ active /1,582,002 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.28MB] [CPU: ▲22.76ms] Passed 4 tests

A check of server-side resources used by HUSKY - Products Filter for WooCommerce Professional
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.73 ▲2.2765.04 ▲25.61
Dashboard /wp-admin5.59 ▲2.2965.28 ▲17.70
Posts /wp-admin/edit.php5.64 ▲2.2974.24 ▲26.37
Add New Post /wp-admin/post-new.php8.17 ▲2.29112.21 ▲21.69
Media Library /wp-admin/upload.php5.51 ▲2.2859.87 ▲26.05

Server storage [IO: ▲8.76MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 765 new files
Database: 1 new table, 10 new options
New tables
wp_woof_sd
New WordPress options
widget_woof_widget
woof_show_author_search
can_compress_scripts
widget_recent-posts
db_upgraded
woof_version
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
woof_later_rate_alert

Browser metrics Passed 4 tests

A check of browser resources used by HUSKY - Products Filter for WooCommerce Professional
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,995 ▲23413.99 ▼0.3610.00 ▲8.4341.46 ▼0.35
Dashboard /wp-admin2,223 ▲435.59 ▼0.0194.65 ▲9.8739.27 ▲0.82
Posts /wp-admin/edit.php2,153 ▲562.34 ▲0.3342.36 ▲6.1133.61 ▲1.49
Add New Post /wp-admin/post-new.php1,558 ▲1823.03 ▲4.81607.23 ▼36.8156.68 ▼7.16
Media Library /wp-admin/upload.php1,442 ▲424.36 ▲0.2199.34 ▲4.1342.05 ▼2.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_woof_sd
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • woof_later_rate_alert
    • woof_version
    • woof_show_author_search
    • widget_recent-posts
    • widget_woof_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 193× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/woocommerce-products-filter/ext/smart_designer/data/switcher.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/quick_search/views/sort_html.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/step_filer/index.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/meta_filter/html_types/textinput/index.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/smart_designer/views/tabs_content.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/meta_filter/views/tabs_content.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/by_onsales/views/options.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/meta_filter/html_types/mselect/views/woof.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/meta_filter/html_types/select/views/additional_options.php
    • > /wp-content/plugins/woocommerce-products-filter/ext/front_builder/options/sections/by_featured.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: subscr in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 6
    • > PHP Notice
      Undefined variable: subscr in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php:9
    • > PHP Notice
      Undefined variable: subscr in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/item_list_subscr.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 4
    • > PHP Notice
      Undefined variable: subscr in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-filter/ext/products_messenger/views/email_template.php on line 4

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)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add descriptions for screenshots #10, #11, #12, #13, #14, #15, #16, #17, #18, #2, #22, #23, #24, #25, #26, #28, #29, #3, #4, #5, #6, #7, #8, #9 in woocommerce-products-filter/assets to your readme.txt
You can look at the official readme.txt

woocommerce-products-filter/index.php 85% from 13 tests

This is the main PHP file of "HUSKY - Products Filter for WooCommerce Professional" version 1.3.4.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-products-filter.php" instead of "index.php")
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "WP 4.9.0")

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
Everything looks great! No dangerous files found in this plugin100,789 lines of code in 505 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1217,9046,28539,075
PHP2015,7651,17929,296
CSS1251,78170817,309
PO File75,4723,46412,152
SVG341012,319
Sass1313269454
JSON20079
HTML16067
Markdown116038

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity43.36
▷ Minimum class complexity1.00
▷ Maximum class complexity721.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes70
▷ Abstract classes34.29%
▷ Concrete classes6795.71%
▷ Final classes4871.64%
Methods873
▷ Static methods728.25%
▷ Public methods78089.35%
▷ Protected methods202.29%
▷ Private methods738.36%
Functions79
▷ Named functions1721.52%
▷ Anonymous functions6278.48%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
136 compressed PNG files occupy 0.82MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/checked3.png0.78KB0.74KB▼ 5.24%
ext/by_author/img/eye-icon2.png0.81KB0.92KB0.00%
js/icheck/skins/flat/grey.png1.48KB1.65KB0.00%
js/icheck/skins/square/aero.png2.12KB1.83KB▼ 13.71%
js/ion.range-slider/img/sprite-skin-flat.png0.30KB0.28KB▼ 5.92%