83% advanced-product-search-for-woo

Code Review | Advanced Product Search For WooCommerce

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

About plugin

  • Plugin page: advanced-product-...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.9.0
  • WordPress version: 5.9.2
  • First release: Jul 20, 2019
  • Latest release: Feb 3, 2022
  • Number of updates: 30
  • Update frequency: every 31.1 days
  • Top authors: athemeart (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

6,000+ active / 70,693 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▼298.11ms] Passed 4 tests

An overview of server-side resources used by Advanced Product Search For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5056.06 ▲5.11
Dashboard /wp-admin3.97 ▲0.5744.79 ▲11.75
Posts /wp-admin/edit.php4.26 ▲0.6245.41 ▲7.71
Add New Post /wp-admin/post-new.php7.48 ▲0.5194.35 ▼1,210.54
Media Library /wp-admin/upload.php3.90 ▲0.6028.66 ▲5.27
Advanced Product Search /wp-admin/admin.php?page=advanced-product-search-for-woo3.9030.48

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, 4 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Product Search For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,148 ▲39417.98 ▲2.269.26 ▲3.612.01 ▼0.89
Dashboard /wp-admin3,136 ▲2758.35 ▲2.16142.40 ▲11.20156.43 ▼4.53
Posts /wp-admin/edit.php2,971 ▲2834.98 ▲1.7579.61 ▲14.59138.66 ▼2.62
Add New Post /wp-admin/post-new.php1,703 ▲3516.09 ▼1.89393.93 ▲9.71160.33 ▲9.01
Media Library /wp-admin/upload.php1,750 ▲555.89 ▲0.40107.53 ▼37.26181.84 ▲0.41
Advanced Product Search /wp-admin/admin.php?page=advanced-product-search-for-woo4,9086.29150.55130.93

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 4 options
    • apsw_color_scheme
    • apsw_search_form
    • apsw_search_results
    • widget_aspw-widgets-wrap

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > 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-select-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-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-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-color-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-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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 47 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (preview screen 0), #2 (Plugins Options 1), #3 (Plugins Options 2), #4 (Plugins Options 3)
The official readme.txt is a good inspiration

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

The main PHP file in "Advanced Product Search For WooCommerce" ver. 1.0.9 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "3.0.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin6,483 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
▷ Static methods65.71%
▷ Public methods9590.48%
▷ Protected methods21.90%
▷ Private methods87.62%
▷ Named functions480.00%
▷ Anonymous functions120.00%
▷ Global constants15100.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
11 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/search_form_style_4.png7.86KB3.36KB▼ 57.25%
assets/images/search_form_style_3.png2.75KB1.29KB▼ 53.31%
assets/images/search_form_style_6.png5.54KB2.59KB▼ 53.29%
screenshot-1.png61.64KB28.13KB▼ 54.37%
assets/images/search_form_style_1.png3.49KB1.81KB▼ 48.24%