83% themify-wc-product-filter

Code Review | Themify - WooCommerce Product Filter

WordPress plugin Themify - WooCommerce Product Filter scored83%from 54 tests.

About plugin

  • Plugin page: themify-wc-produc...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2016
  • Latest release: Oct 25, 2023
  • Number of updates: 309
  • Update frequency: every 8.2 days
  • Top authors: themifyme (100%)

Code review

54 tests

User reviews

68 reviews

Install metrics

30,000+ active /475,357 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.77ms] Passed 4 tests

Analyzing server-side resources used by Themify - WooCommerce Product Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.42 ▲4.27
Dashboard /wp-admin3.31 ▼0.0443.99 ▼10.57
Posts /wp-admin/edit.php3.36 ▲0.0046.36 ▲2.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.49 ▼15.25
Media Library /wp-admin/upload.php3.23 ▲0.0030.90 ▲0.46

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 83 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
themify_WPF_activation_redirect
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Themify - WooCommerce Product Filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▼0.081.73 ▼0.0744.12 ▲3.32
Dashboard /wp-admin2,192 ▲155.61 ▼0.0486.32 ▲2.4139.43 ▼0.66
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0140.09 ▲5.3234.56 ▼3.92
Add New Post /wp-admin/post-new.php1,526 ▼023.02 ▼0.46682.66 ▼29.0555.49 ▲0.62
Media Library /wp-admin/upload.php1,397 ▼64.20 ▼0.0297.93 ▲2.5840.29 ▼3.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • themify_WPF_activation_redirect
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/themify-wc-product-filter/admin/partials/form.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/screen.php): failed to open stream: No such file or directory in wp-content/plugins/themify-wc-product-filter/includes/class-wpf-list.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/themify-wc-product-filter/includes/class-wpf-list.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/themify-wc-product-filter/includes/class-wpf-list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/themify-wc-product-filter/includes/class-wpf-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/themify-wc-product-filter/public/class-wpf-public.php:981
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/themify-wc-product-filter/admin/partials/import.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WPF_List_Table' not found in wp-content/plugins/themify-wc-product-filter/admin/partials/list.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPF' not found in wp-content/plugins/themify-wc-product-filter/admin/partials/tax.php:2

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 issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
Please take inspiration from this readme.txt

themify-wc-product-filter/themify-wc-product-filter.php 77% from 13 tests

The primary PHP file in "Themify - WooCommerce Product Filter" version 1.4.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 245 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin7,715 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
CSS12477883,176
PHP173928983,166
JavaScript8103421,307
HTML12065
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity72.10
▷ Minimum class complexity1.00
▷ Maximum class complexity348.00
Average method complexity6.36
▷ Minimum method complexity1.00
▷ Maximum method complexity84.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods134
▷ Static methods3324.63%
▷ Public methods11787.31%
▷ Protected methods21.49%
▷ Private methods1511.19%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
17 compressed PNG files occupy 0.15MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/jquery-ui/images/ui-icons_222222_256x240.png3.68KB4.18KB0.00%
public/css/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png0.07KB0.08KB0.00%
admin/img/horizontal-layout.png0.11KB0.13KB0.00%
public/css/jquery-ui/images/ui-icons_888888_256x240.png3.68KB4.18KB0.00%
public/css/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.10KB0.15KB0.00%