79% ajax-search-for-woocommerce

Code Review | FiboSearch - Ajax Search for WooCommerce

WordPress plugin FiboSearch - Ajax Search for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: ajax-search-for-w...
  • Plugin version: 1.26.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: May 17, 2016
  • Latest release: Oct 19, 2023
  • Number of updates: 220
  • Update frequency: every 12.3 days
  • Top authors: damian-gora (97.27%)matczar (3.18%)

Code review

54 tests

User reviews

1575 reviews

Install metrics

100,000+ active /2,408,214 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲5.00MB] [CPU: ▲22.06ms] Passed 4 tests

This is a short check of server-side resources used by FiboSearch - Ajax Search for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.90 ▲5.4377.56 ▲40.40
Dashboard /wp-admin8.92 ▲5.6167.70 ▲18.40
Posts /wp-admin/edit.php8.92 ▲5.5673.65 ▲27.67
Add New Post /wp-admin/post-new.php9.28 ▲3.39104.55 ▲8.64
Media Library /wp-admin/upload.php8.92 ▲5.6967.53 ▲33.52
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.9256.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 376 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
fs_active_plugins
widget_theysaidso_widget
widget_recent-comments
fs_accounts
widget_recent-posts
db_upgraded
theysaidso_admin_options
fs_debug_mode

Browser metrics Passed 4 tests

A check of browser resources used by FiboSearch - Ajax Search for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.36 ▲0.001.83 ▲0.2432.89 ▼5.86
Dashboard /wp-admin2,225 ▲515.54 ▲0.0083.98 ▼0.3839.24 ▼4.21
Posts /wp-admin/edit.php2,131 ▲312.12 ▲0.1135.37 ▼0.2732.57 ▼2.46
Add New Post /wp-admin/post-new.php1,543 ▲1522.82 ▼0.37662.43 ▼0.1754.26 ▼2.51
Media Library /wp-admin/upload.php1,430 ▲364.20 ▲0.0394.42 ▼2.8148.56 ▲3.27
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0691.6623.7625.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/ajax-search-for-woocommerce/fs/lib/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_accounts
    • fs_active_plugins
    • fs_debug_mode
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: product search, woocommerce search, ajax search, search by sku, woocommerce

ajax-search-for-woocommerce/ajax-search-for-woocommerce.php 85% from 13 tests

The principal PHP file in "FiboSearch - Ajax Search for WooCommerce" v. 1.26.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.5")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin59,084 lines of code in 317 files:
LanguageFilesBlank linesComment linesLines of code
PHP26610,65821,21748,887
JavaScript181,1613596,095
CSS21737343,782
JSON600214
Sass23048
XML33047
SVG10011

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity53.07
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces37
Interfaces0
Traits0
Classes116
▷ Abstract classes32.59%
▷ Concrete classes11397.41%
▷ Final classes10.88%
Methods1,824
▷ Static methods35219.30%
▷ Public methods1,37375.27%
▷ Protected methods221.21%
▷ Private methods42923.52%
Functions332
▷ Named functions12738.25%
▷ Anonymous functions20561.75%
Constants193
▷ Global constants11559.59%
▷ Class constants7840.41%
▷ Public constants78100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 compressed PNG files occupy 0.14MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo-128.png5.78KB5.94KB0.00%
assets/img/placeholder-rtl.png0.35KB0.37KB0.00%
assets/img/admin-troubleshooting-woof2.png44.37KB46.71KB0.00%
assets/img/product-preview.png21.30KB22.06KB0.00%
assets/img/logo-for-review.png3.09KB3.12KB0.00%