83% advanced-product-search-for-woo

Code Review | Advanced Product Search For WooCommerce

WordPress plugin Advanced Product Search For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: advanced-product-...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.6
  • WordPress version: 6.3.1
  • First release: Jul 20, 2019
  • Latest release: Oct 11, 2023
  • Number of updates: 66
  • Update frequency: every 23.4 days
  • Top authors: athemeart (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

6,000+ active /112,592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.55MB] [CPU: ▲6.15ms] Passed 4 tests

Analyzing server-side resources used by Advanced Product Search For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5247.82 ▲6.03
Dashboard /wp-admin3.92 ▲0.6262.25 ▲12.69
Posts /wp-admin/edit.php3.98 ▲0.6159.71 ▲11.06
Add New Post /wp-admin/post-new.php6.44 ▲0.5594.19 ▲1.66
Media Library /wp-admin/upload.php3.76 ▲0.5341.96 ▲5.86
Advanced Product Search /wp-admin/admin.php?page=advanced-product-search-for-woo3.7744.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_aspw-widgets-wrap
widget_recent-comments
apsw_color_scheme
widget_recent-posts
apsw_search_form
widget_theysaidso_widget
apsw_search_results

Browser metrics Passed 4 tests

Advanced Product Search For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,081 ▲32014.96 ▲0.617.27 ▲5.2142.70 ▼4.89
Dashboard /wp-admin2,373 ▲1966.38 ▲0.70115.94 ▲11.5139.24 ▼6.67
Posts /wp-admin/edit.php2,299 ▲1993.59 ▲1.6253.75 ▲14.7635.36 ▲1.39
Add New Post /wp-admin/post-new.php1,557 ▲3123.66 ▲0.70645.97 ▼32.4935.31 ▼18.25
Media Library /wp-admin/upload.php1,435 ▲354.27 ▲0.0686.76 ▼13.5143.00 ▼1.66
Advanced Product Search /wp-admin/admin.php?page=advanced-product-search-for-woo3,2544.82132.3363.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-comments
    • apsw_search_form
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • apsw_search_results
    • apsw_color_scheme
    • can_compress_scripts
    • widget_recent-posts
    • widget_aspw-widgets-wrap

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-search-for-woo/lib/predic-widget/class/fields/class-predic-widget-color-field.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-product-search-for-woo/lib/predic-widget/class/class-predic-widget-factory.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-search-for-woo/lib/predic-widget/class/fields/class-predic-widget-textarea-field.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-search-for-woo/lib/predic-widget/class/fields/class-predic-widget-image-uploader-field.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-search-for-woo/lib/predic-widget/class/fields/class-predic-widget-input-field.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/advanced-product-search-for-woo/includes/classes/widgets.php:93
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-search-for-woo/lib/predic-widget/class/fields/class-predic-widget-fa-iconpicker-field.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-search-for-woo/lib/predic-widget/class/fields/class-predic-widget-select-field.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 47 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (preview screen 0), #2 (Plugins Options 1), #3 (Plugins Options 2), #4 (Plugins Options 3)
You can look at the official readme.txt

advanced-product-search-for-woo/advanced-product-search-for-woo.php 92% from 13 tests

This is the main PHP file of "Advanced Product Search For WooCommerce" version 1.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "3.0.0")

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
Everything looks great! No dangerous files found in this plugin6,483 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP177321,2022,929
SVG2002,720
CSS43415531
JavaScript911756241
Sass312062

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.60
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods105
▷ Static methods65.71%
▷ Public methods9590.48%
▷ Protected methods21.90%
▷ Private methods87.62%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants15
▷ Global constants15100.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
11 PNG files occupy 0.25MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/search_form_style_5.png6.60KB3.03KB▼ 54.08%
assets/images/search_form_style_1.png3.49KB1.81KB▼ 48.24%
screenshot-1.png61.64KB28.13KB▼ 54.37%
screenshot-0.png45.43KB20.26KB▼ 55.40%
assets/images/search_form_style_3.png2.75KB1.29KB▼ 53.31%