73% instantsearch-for-woocommerce

Code Review | WooCommerce Search, Filters & Merchandising

WordPress plugin WooCommerce Search, Filters & Merchandising scored73%from 54 tests.

About plugin

  • Plugin page: instantsearch-for...
  • Plugin version: 3.0.26
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-6.4
  • WordPress version: 6.3.1
  • First release: May 1, 2014
  • Latest release: Oct 25, 2023
  • Number of updates: 719
  • Update frequency: every 4.8 days
  • Top authors: instantsearchplus (100%)

Code review

54 tests

User reviews

168 reviews

Install metrics

600+ active /197,682 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.82MB] [CPU: ▲1.46ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Search, Filters & Merchandising
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.8846.48 ▲8.01
Dashboard /wp-admin4.15 ▲0.8549.64 ▲2.80
Posts /wp-admin/edit.php4.20 ▲0.8554.82 ▲8.40
Add New Post /wp-admin/post-new.php6.67 ▲0.7983.28 ▼13.37
Media Library /wp-admin/upload.php4.01 ▲0.7842.26 ▲11.16

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_isp_search_box_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Search, Filters & Merchandising
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7714.56 ▲0.2118.78 ▲17.3137.18 ▼4.51
Dashboard /wp-admin2,227 ▲525.69 ▼0.0492.09 ▼8.9969.91 ▲30.40
Posts /wp-admin/edit.php2,138 ▲352.07 ▼0.0739.27 ▼3.7835.14 ▼4.65
Add New Post /wp-admin/post-new.php1,710 ▲18222.17 ▼0.89723.79 ▲82.8750.01 ▼2.21
Media Library /wp-admin/upload.php1,432 ▲324.14 ▼0.08113.20 ▲18.8482.64 ▲41.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/instantsearch-for-woocommerce/public/wcis_plugin.php+618
    Non-static method WCISPlugin::get_isp_server_url() should not be called statically
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_isp_search_box_widget
    • widget_recent-posts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/instantsearch-for-woocommerce/public/serving.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: product search, merchandising, woocommerce search, search filters, ecommerce search

instantsearch-for-woocommerce/instantsearch-for-woocommerce.php 92% from 13 tests

The entry point to "WooCommerce Search, Filters & Merchandising" version 3.0.26 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.3" instead of "2.0.0")

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
Everything looks great! No dangerous files found in this plugin31,460 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JSON20026,462
PHP127976124,796
CSS516079
PO File2141868
JavaScript310047
Bourne Shell1167
SVG1001

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 183)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity81.62
▷ Minimum class complexity1.00
▷ Maximum class complexity891.00
Average method complexity7.28
▷ Minimum method complexity1.00
▷ Maximum method complexity183.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes430.77%
▷ Concrete classes969.23%
▷ Final classes00.00%
Methods168
▷ Static methods3118.45%
▷ Public methods12775.60%
▷ Protected methods31.79%
▷ Private methods3822.62%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants00.00%
▷ Class constants22100.00%
▷ Public constants22100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 1.85MB with 1.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/images/instantsearchplus_logo_16x16.png0.56KB0.49KB▼ 13.39%
assets/screenshot-5.png58.18KB21.36KB▼ 63.29%
assets/screenshot-3.png553.86KB125.95KB▼ 77.26%
(invalid) assets/screenshot-4.png136.27KB0.00KB▼ 100.00%
assets/screenshot-2.png524.09KB144.13KB▼ 72.50%