90% iflair-woo-product-filters

Code Review | WooCommerce Product Filters by iFlair

WordPress plugin WooCommerce Product Filters by iFlair scored90%from 54 tests.

About plugin

  • Plugin page: iflair-woo-produc...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Aug 8, 2023
  • Latest release: Oct 3, 2023
  • Number of updates: 14
  • Update frequency: every 4.2 days
  • Top authors: jinalshah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /182 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.82ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Product Filters by iFlair
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.23 ▼2.13
Dashboard /wp-admin3.31 ▲0.0042.15 ▼3.69
Posts /wp-admin/edit.php3.36 ▲0.0049.49 ▲3.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.88 ▼0.41
Media Library /wp-admin/upload.php3.23 ▲0.0031.63 ▼1.03

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 100 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Product Filters by iFlair
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.45 ▼0.101.98 ▲0.1840.87 ▲0.67
Dashboard /wp-admin2,195 ▲175.64 ▼0.0891.29 ▼6.8137.61 ▼4.98
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0140.28 ▲3.7336.19 ▼0.91
Add New Post /wp-admin/post-new.php1,528 ▼623.10 ▼0.08640.27 ▼20.6566.43 ▲9.04
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0494.10 ▼3.7743.89 ▼1.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: woocommerce product filter, woocommerce filter, woocommerce filter plugins, e-commerce filter, shop filter...

iflair-woo-product-filters/iflair-woo-product-filters.php Passed 13 tests

Analyzing the main PHP file in "WooCommerce Product Filters by iFlair" version 1.1
65 characters long description:
Following plugin is used to apply filter on WooCommerce products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected10,790 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
SVG13055,695
PHP398511,1893,023
JavaScript4376521,148
CSS61750924

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity22.70
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods71
▷ Static methods34.23%
▷ Public methods6895.77%
▷ Protected methods00.00%
▷ Private methods34.23%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 0.35MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/p-search.png7.71KB8.47KB0.00%
assets/images/down-arrow.png0.31KB0.30KB▼ 2.19%
public/images/maximize.png5.29KB3.09KB▼ 41.51%
assets/screenshot-1.png101.30KB27.46KB▼ 72.89%
public/images/bucket.png7.96KB4.66KB▼ 41.46%