90% woo-suggestion-engine

Code Review | Suggestion Engine for WooCommerce

WordPress plugin Suggestion Engine for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woo-suggestion-en...
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2019
  • Latest release: Jun 26, 2023
  • Number of updates: 26
  • Update frequency: every 55.5 days
  • Top authors: mytrinh (80.77%)kimvt1991 (15.38%)mrt3vn (7.69%)villatheme (7.69%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,942 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.63ms] Passed 4 tests

Server-side resources used by Suggestion Engine for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.27 ▼6.78
Dashboard /wp-admin3.33 ▲0.0346.52 ▼4.30
Posts /wp-admin/edit.php3.38 ▲0.0347.43 ▼0.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.12 ▼5.46
Media Library /wp-admin/upload.php3.25 ▲0.0335.26 ▼1.96

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Suggestion Engine for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.58 ▲0.231.72 ▼0.0743.58 ▼3.31
Dashboard /wp-admin2,199 ▲225.56 ▼0.1186.77 ▼17.4437.62 ▼4.69
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0735.25 ▼2.9333.86 ▲2.55
Add New Post /wp-admin/post-new.php1,536 ▲823.10 ▼0.06640.32 ▲46.6961.53 ▲7.06
Media Library /wp-admin/upload.php1,407 ▲74.14 ▼0.13100.64 ▼6.0345.27 ▲0.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: woocommerce product suggestion, woo suggested product, search engine, search woocommerce, woo search...

woo-suggestion-engine/woo-suggestion-engine.php Passed 13 tests

The primary PHP file in "Suggestion Engine for WooCommerce" version 2.0.1 is used by WordPress to initiate all plugin functionality
112 characters long description:
The easiest way helps you sell more products by search engine and suggested product form your WooCommerce store.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected15,095 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript181,2963696,091
PHP143254504,522
SVG30122,880
CSS2654141874
Sass4435728

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity62.92
▷ Minimum class complexity2.00
▷ Maximum class complexity202.00
Average method complexity5.97
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods164
▷ Static methods5231.71%
▷ Public methods13884.15%
▷ Protected methods2414.63%
▷ Private methods21.22%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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 files were detected