68% smoove-abandoned-cart-trigger-for-woocommerce

Code Review | Smoove abandoned cart trigger for WooCommerce

WordPress plugin Smoove abandoned cart trigger for WooCommerce scored 68% from 54 tests.

About plugin

  • Plugin page: smoove-abandoned-...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.3-5.9.1
  • WordPress version: 5.9.2
  • First release: Jun 2, 2021
  • Latest release: Mar 22, 2022
  • Number of updates: 83
  • Update frequency: every 5.8 days
  • Top authors: matansmoove (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 923 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.19MB] [CPU: ▼329.95ms] Passed 4 tests

A check of server-side resources used by Smoove abandoned cart trigger for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.26 ▼0.2618.37 ▼31.28
Dashboard /wp-admin3.18 ▼0.2416.29 ▼15.86
Posts /wp-admin/edit.php3.18 ▼0.4717.48 ▼19.97
Add New Post /wp-admin/post-new.php3.18 ▼3.8016.45 ▼1,251.39
Media Library /wp-admin/upload.php3.18 ▼0.1314.65 ▼17.16
All Abandoned Carts /wp-admin/edit.php?post_type=abandoned_cart3.1816.07
Plugin Test /wp-admin/edit.php?post_type=abandoned_cart&page=wsiapi_test3.1816.10
Add New /wp-admin/post-new.php?post_type=abandoned_cart3.1817.55
Smoove Settings /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings3.1815.67

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 27 new files
Database: 1 new table, no new options
New tables
wp_smoove_log

Browser metrics Passed 4 tests

A check of browser resources used by Smoove abandoned cart trigger for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,949 ▲19516.75 ▲1.188.86 ▲2.612.38 ▲0.09
Dashboard /wp-admin2,961 ▲1006.17 ▼0.03120.81 ▼13.75176.49 ▲18.90
Posts /wp-admin/edit.php2,823 ▲1293.26 ▼0.1163.22 ▼1.39138.63 ▲3.11
Add New Post /wp-admin/post-new.php1,702 ▼916.37 ▼4.80418.77 ▼8.63182.18 ▲22.90
Media Library /wp-admin/upload.php1,769 ▲715.56 ▲0.04125.89 ▼23.00202.89 ▲1.94
All Abandoned Carts /wp-admin/edit.php?post_type=abandoned_cart1,5813.3159.70113.91
Plugin Test /wp-admin/edit.php?post_type=abandoned_cart&page=wsiapi_test1,2182.5554.11145.61
Add New /wp-admin/post-new.php?post_type=abandoned_cart2,1384.0877.16163.36
Smoove Settings /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings1,2432.5452.02129.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/hooks.php+392
    Trying to access array offset on value of type bool
  • Zombie tables detected upon uninstall: 1 table
    • wp_smoove_log

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings
    • > Notice in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/settings.php+111
    Trying to access array offset on value of type bool
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings
    • > Notice in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/formElementsClass.php+268
    Undefined index: width
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings
    • > Notice in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/formElementsClass.php+100
    Undefined index: placeholder
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings
    • > Notice in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/formElementsClass.php+73
    Undefined index: default
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings
    • > Notice in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/formElementsClass.php+270
    Undefined variable: out
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=abandoned_cart&page=wsismoove_seetings
    • > Notice in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/settings.php+111
    Undefined index: name

SRP 50% from 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
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/meta_box.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/wp-smoove-integration.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/cpt.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/settings.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/scripts.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/smoove-abandoned-cart-trigger-for-woocommerce/modules/hooks.php:12

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 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (The settings page > enter your API key generated from the Smoove account > set the cart lifetime interval and select restoration settings for deleted or unsubscribed contacts.), #2 (The plugin test page > enter “dummy” shopper data to test the plugin’s connection with your Smoove account.), #3 (A successful test will show a “Code: 200, Message: OK”.), #4 (The Abandoned carts page where you can view the history log.)
The official readme.txt might help

smoove-abandoned-cart-trigger-for-woocommerce/wp-smoove-integration.php 92% from 13 tests

The main PHP script in "Smoove abandoned cart trigger for WooCommerce" version 1.0.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smoove-abandoned-cart-trigger-for-woocommerce.php" instead of "wp-smoove-integration.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 plugin9,787 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS2678,202
PHP84142091,340
PO File1359734126
JavaScript2241119

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.88
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants0
▷ Global constants00.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
8 PNG files occupy 0.32MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/images/32X32.png1.87KB0.81KB▼ 56.61%
modules/inc/assets/screenshot-1.png38.96KB14.25KB▼ 63.41%
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/screenshot-4.png191.34KB71.39KB▼ 62.69%
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%