10% extreme-search-suggestion-for-woocommerce

Code Review | Extreme Search Suggestion for WooCommerce (AJAX)

WordPress plugin Extreme Search Suggestion for WooCommerce (AJAX) scored10%from 54 tests.

About plugin

  • Plugin page: extreme-search-su...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2021
  • Latest release: Dec 4, 2021
  • Number of updates: 15
  • Update frequency: every 4.5 days
  • Top authors: vickycodeaddict (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /428 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/extreme-search-suggestion-for-woocommerce/includes/class-extreme-search-activator.php+82
    Uncaught Error: Class 'Extreme_Search_Json_Factory' not found in wp-content/plugins/extreme-search-suggestion-for-woocommerce/includes/class-extreme-search-activator.php:82
    Stack trace:
    #0 wp-content/plugins/extreme-search-suggestion-for-woocommerce/extreme-search.php(66): Extreme_Search_Activator::activate()
    #1 wp-includes/class-wp-hook.php(310): activate_extreme_search()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.56ms] Passed 4 tests

An overview of server-side resources used by Extreme Search Suggestion for WooCommerce (AJAX)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.81 ▼0.73
Dashboard /wp-admin3.31 ▲0.0146.88 ▼3.84
Posts /wp-admin/edit.php3.37 ▲0.0147.33 ▼1.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.77 ▼4.28
Media Library /wp-admin/upload.php3.24 ▲0.0136.84 ▲0.38

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 17 new options
New WordPress options
wc_settings_tab_extreme_search_section_display_terms
wc_settings_tab_extreme_search_section_search_terms
wc_settings_tab_extreme_search_popup_search
wc_settings_tab_extreme_search_redirect
wc_settings_tab_extreme_search_exclude_product
wc_settings_tab_extreme_search_section_search_field
wc_settings_tab_extreme_search_section_search_min_char
widget_recent-posts
can_compress_scripts
wc_settings_tab_extreme_search_section_display_field
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Extreme Search Suggestion for WooCommerce (AJAX)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.78 ▲0.551.82 ▼0.7244.23 ▼1.92
Dashboard /wp-admin2,206 ▲186.06 ▲0.18111.14 ▼5.8041.50 ▼3.89
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0133.28 ▼1.0533.12 ▼3.41
Add New Post /wp-admin/post-new.php1,546 ▲2718.55 ▼4.65592.31 ▼50.4171.15 ▲23.20
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0794.57 ▲0.7941.25 ▼0.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • extreme_search_prod_json_name
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • extreme_search_cat_json_name
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: search suggestion, ajax search suggestion, extreme fast search suggestion, woocommerce suggestion, fast suggestion...

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

The main PHP file in "Extreme Search Suggestion for WooCommerce (AJAX)" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("extreme-search-suggestion-for-woocommerce.php" instead of "extreme-search.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin1,104 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP12290417842
CSS330148
JavaScript530394
JSON10020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.67
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods58
▷ Static methods23.45%
▷ Public methods5086.21%
▷ Protected methods00.00%
▷ Private methods813.79%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin