84% wc-product-filter

Code Review | PickPlugins Product Filter for WooCommerce

WordPress plugin PickPlugins Product Filter for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: wc-product-filter
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0+
  • WordPress version: 5.8.1
  • First release: Nov 6, 2018
  • Latest release: Aug 1, 2021
  • Number of updates: 35
  • Update frequency: every 28.5 days
  • Top authors: pickplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,465 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼143.81ms] Passed 4 tests

This is a short check of server-side resources used by PickPlugins Product Filter for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.31 ▲0.4841.18 ▲7.67
Dashboard /wp-admin3.59 ▲0.5451.77 ▲4.18
Posts /wp-admin/edit.php3.64 ▲0.5346.28 ▼0.04
Add New Post /wp-admin/post-new.php5.89 ▲0.4687.36 ▼580.40
Media Library /wp-admin/upload.php3.47 ▲0.4736.30 ▲1.03
Product Filter /wp-admin/edit.php?post_type=product&page=wc_pf_settings3.2826.56

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 1 new option
New WordPress options
widget_widget_wcproductfilter

Browser metrics Passed 4 tests

An overview of browser requirements for PickPlugins Product Filter for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.95 ▲0.328.45 ▼5.0750.25 ▼2.05
Dashboard /wp-admin2,973 ▲425.88 ▼0.06154.36 ▲5.58111.15 ▼1.57
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0168.14 ▼1.2481.46 ▼12.27
Add New Post /wp-admin/post-new.php1,683 ▼018.74 ▲0.00393.25 ▼0.24107.46 ▼1.72
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.00163.49 ▲13.81116.93 ▲1.00
Product Filter /wp-admin/edit.php?post_type=product&page=wc_pf_settings280.900.0511.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_widget_wcproductfilter

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=product&page=wc_pf_settings
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=wc_pf_settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #3 (screenshot-3), #4 (screenshot-4), #5 (screenshot-5), #6 (screenshot-6), #7 (screenshot-7)
The official readme.txt is a good inspiration

wc-product-filter/wc-product-filter.php Passed 13 tests

The main PHP file in "PickPlugins Product Filter for WooCommerce" ver. 1.0.9 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
Advance filter & search for shop page to find product easily.

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
No dangerous file extensions were detected3,159 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP111,2951362,332
CSS322385688
JavaScript211742139

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity129.60
▷ Minimum class complexity1.00
▷ Maximum class complexity641.00
Average method complexity15.29
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
12 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/global/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.23KB0.11KB▼ 51.05%
assets/global/css/images/ui-icons_555555_256x240.png3.20KB3.50KB0.00%
assets/global/css/images/ui-bg_glass_65_ffffff_1x400.png0.14KB0.08KB▼ 40.41%
assets/global/css/images/ui-icons_cc0000_256x240.png3.19KB3.49KB0.00%
assets/global/css/images/ui-bg_flat_75_ffffff_40x100.png0.23KB0.11KB▼ 50.64%