83% motive-commerce-search

Code Review | Advanced Product Search for WooCommerce - Motive Commerce Search

WordPress plugin Advanced Product Search for WooCommerce - Motive Commerce Search scored83%from 54 tests.

About plugin

  • Plugin page: motive-commerce-s...
  • Plugin version: 1.26.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 48
  • Update frequency: every 8.1 days
  • Top authors: motiveco (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /3,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.16ms] Passed 4 tests

An overview of server-side resources used by Advanced Product Search for WooCommerce - Motive Commerce Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.48 ▼0.35
Dashboard /wp-admin3.31 ▲0.0048.80 ▼1.90
Posts /wp-admin/edit.php3.36 ▲0.0047.66 ▼4.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.06 ▼17.88
Media Library /wp-admin/upload.php3.23 ▲0.0037.48 ▲4.26

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 112 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
MOTIVE_FIRST_ACTIVATION_DATE
db_upgraded
MOTIVE_STORED_VERSION
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Product Search for WooCommerce - Motive Commerce Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.22 ▼0.021.66 ▼0.0439.09 ▲1.14
Dashboard /wp-admin2,198 ▲185.62 ▲0.0196.68 ▲5.5042.45 ▲0.28
Posts /wp-admin/edit.php2,097 ▼31.96 ▲0.0235.77 ▼5.4036.48 ▼2.26
Add New Post /wp-admin/post-new.php1,526 ▼021.08 ▼2.13777.71 ▲129.4554.29 ▲3.95
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0198.80 ▲5.4344.47 ▲2.72

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • MOTIVE_FIRST_ACTIVATION_DATE
    • widget_theysaidso_widget
    • can_compress_scripts
    • MOTIVE_STORED_VERSION

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Motive\\Woocommerce\\Lang\\LangInterface' not found in wp-content/plugins/motive-commerce-search/src/Lang/SingleLang.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Motive\\Woocommerce\\LanguageManager' not found in wp-content/plugins/motive-commerce-search/admin/partials/motive-admin-display.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Motive\\Woocommerce\\ScriptLoader' not found in wp-content/plugins/motive-commerce-search/src/ScriptLoaders/ScriptHeadPrinter.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Motive\\Woocommerce\\ScriptLoaders\\AbstractScriptEnqueuer' not found in wp-content/plugins/motive-commerce-search/src/ScriptLoaders/ScriptInlineEnqueuer.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Motive\\Woocommerce\\ScriptLoaders\\AbstractScriptEnqueuer' not found in wp-content/plugins/motive-commerce-search/src/ScriptLoaders/ScriptSrcEnqueuer.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Motive\\Woocommerce\\ScriptLoader' not found in wp-content/plugins/motive-commerce-search/src/ScriptLoaders/AbstractScriptEnqueuer.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Motive\\Woocommerce\\Lang\\LangInterface' not found in wp-content/plugins/motive-commerce-search/src/Lang/WpmlLang.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce search, instant search, site search, product search

motive-commerce-search/motive.php 77% from 13 tests

The main file in "Advanced Product Search for WooCommerce - Motive Commerce Search" v. 1.26.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("motive-commerce-search.php" instead of "motive.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin3,829 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
PHP877983,4773,614
PO File77719167
JSON10028
XML162718
JavaScript10201
SVG11211

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.96
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes77
▷ Abstract classes56.49%
▷ Concrete classes7293.51%
▷ Final classes00.00%
Methods258
▷ Static methods7127.52%
▷ Public methods20378.68%
▷ Protected methods207.75%
▷ Private methods3513.57%
Functions17
▷ Named functions635.29%
▷ Anonymous functions1164.71%
Constants51
▷ Global constants11.96%
▷ Class constants5098.04%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin