84% shopmagic-abandoned-carts

Code Review | Recover Abandoned Carts for WooCommerce by ShopMagic

WordPress plugin Recover Abandoned Carts for WooCommerce by ShopMagic scored84%from 54 tests.

About plugin

  • Plugin page: shopmagic-abandon...
  • Plugin version: 2.2.10
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2020
  • Latest release: Nov 14, 2023
  • Number of updates: 72
  • Update frequency: every 15.4 days
  • Top authors: wpdesk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /44,890 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼0.76ms] Passed 4 tests

Analyzing server-side resources used by Recover Abandoned Carts for WooCommerce by ShopMagic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4142.93 ▲7.04
Dashboard /wp-admin3.70 ▲0.4046.64 ▼1.54
Posts /wp-admin/edit.php3.75 ▲0.4051.95 ▲5.89
Add New Post /wp-admin/post-new.php6.28 ▲0.4093.25 ▼11.29
Media Library /wp-admin/upload.php3.63 ▲0.4035.46 ▲3.90

Server storage [IO: ▲0.51MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 186 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
plugin_activation_shopmagic-abandoned-carts/shopmagic-abandoned-carts.php
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
wpdesk_requirements_plugins_data

Browser metrics Passed 4 tests

Recover Abandoned Carts for WooCommerce by ShopMagic: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.07 ▼0.211.60 ▼0.0444.35 ▲3.05
Dashboard /wp-admin2,201 ▲235.61 ▼0.1191.60 ▼21.4138.02 ▼6.13
Posts /wp-admin/edit.php2,109 ▲62.13 ▲0.1239.31 ▼1.0936.30 ▲0.88
Add New Post /wp-admin/post-new.php1,532 ▲623.21 ▲2.14660.17 ▲74.9157.39 ▲12.11
Media Library /wp-admin/upload.php1,406 ▲64.23 ▲0.06100.76 ▲0.8842.21 ▲1.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • plugin_activation_shopmagic-abandoned-carts/shopmagic-abandoned-carts.php
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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 | 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
Please take a closer look at the following
  • 62× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\ShopMagicCart\\Filter\\CartBasedFilter' not found in wp-content/plugins/shopmagic-abandoned-carts/src/Filter/CartItems.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\ShopMagic\\HookEmitter\\RecurringCleaner' not found in wp-content/plugins/shopmagic-abandoned-carts/src/HookEmitter/CartExpiration.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicCartVendor\\WPDesk_Translatable' not found in wp-content/plugins/shopmagic-abandoned-carts/vendor_prefixed/wp-builder/src/Plugin/SlimPlugin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\ShopMagicCart\\Cart\\BaseCart' not found in wp-content/plugins/shopmagic-abandoned-carts/src/Cart/NullCart.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicCartVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/shopmagic-abandoned-carts/vendor_prefixed/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/Assets.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\ShopMagicCart\\Placeholder\\CartBasedPlaceholder' not found in wp-content/plugins/shopmagic-abandoned-carts/src/Placeholder/CartItems.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\ShopMagicCart\\Placeholder\\CartBasedPlaceholder' not found in wp-content/plugins/shopmagic-abandoned-carts/src/Placeholder/CartLink.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicCartVendor\\WPDesk\\PluginBuilder\\Plugin\\AbstractPlugin' not found in wp-content/plugins/shopmagic-abandoned-carts/src/Plugin.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\ShopMagicCart\\Cart\\BaseCart' not found in wp-content/plugins/shopmagic-abandoned-carts/src/Cart/AbandonedCart.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WPDesk\\ShopMagic\\Workflow\\Event\\Event' not found in wp-content/plugins/shopmagic-abandoned-carts/src/Event/AbandonedCartEvent.php:19

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: abandoned carts, abandoned cart, cart recovery, cart abandonment, abandoned cart email

shopmagic-abandoned-carts/shopmagic-abandoned-carts.php Passed 13 tests

Analyzing the main PHP file in "Recover Abandoned Carts for WooCommerce by ShopMagic" version 2.2.10
96 characters long description:
Allows saving customer details on a partial WooCommerce purchase and send abandoned cart emails.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected7,508 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
PHP1598672,9326,947
JSON900367
CSS419290
JavaScript31155
TypeScript113049

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.09
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces32
Interfaces22
Traits5
Classes110
▷ Abstract classes65.45%
▷ Concrete classes10494.55%
▷ Final classes2524.04%
Methods543
▷ Static methods448.10%
▷ Public methods45683.98%
▷ Protected methods213.87%
▷ Private methods6612.15%
Functions34
▷ Named functions1441.18%
▷ Anonymous functions2058.82%
Constants64
▷ Global constants00.00%
▷ Class constants64100.00%
▷ Public constants64100.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
6 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor_prefixed/wp-wpdesk-tracker/src/assets/images/wpdesk.net.png2.36KB2.43KB0.00%
vendor_prefixed/wp-wpdesk-tracker/src/assets/images/logo.png2.36KB2.43KB0.00%
vendor_prefixed/wp-wpdesk-tracker/src/assets/images/wpdesk.pl.png2.36KB2.43KB0.00%
vendor_prefixed/wp-wpdesk-tracker/src/assets/images/flexibleshipping.com.png5.63KB3.68KB▼ 34.58%
vendor_prefixed/wp-wpdesk-tracker/src/assets/images/octolize.com.png88.91KB39.07KB▼ 56.06%