68% cart-recovery

Code Review | Cart recovery for WordPress

WordPress plugin Cart recovery for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: cart-recovery
  • Plugin version: 3.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Oct 10, 2023
  • Number of updates: 147
  • Update frequency: every 18.9 days
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /17,789 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.53ms] Passed 4 tests

Analyzing server-side resources used by Cart recovery for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.68 ▲1.25
Dashboard /wp-admin3.40 ▲0.0949.90 ▲0.72
Posts /wp-admin/edit.php3.51 ▲0.1644.89 ▼3.31
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.94 ▼12.47
Media Library /wp-admin/upload.php3.32 ▲0.0934.86 ▲0.95

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 104 new files
Database: 3 new tables, 7 new options
New tables
wp_crfw_cart
wp_crfw_cart_event
wp_crfw_cart_meta
New WordPress options
crfw_db_version
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Cart recovery for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13713.43 ▼0.938.23 ▲6.5543.30 ▲0.65
Dashboard /wp-admin2,195 ▲215.63 ▲0.0182.63 ▼4.8940.04 ▼1.13
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0434.10 ▼0.3635.11 ▲4.65
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.44675.77 ▼58.3754.58 ▼2.28
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0595.16 ▼6.7942.12 ▼5.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 3 tables
    • wp_crfw_cart
    • wp_crfw_cart_meta
    • wp_crfw_cart_event
  • The uninstall procedure has failed, leaving 7 options in the database
    • crfw_db_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 11× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/cart-recovery/templates/admin-header-tab.php
    • > /wp-content/plugins/cart-recovery/templates/email-cart-row.php
    • > /wp-content/plugins/cart-recovery/templates/email-cart-row-image.php
    • > /wp-content/plugins/cart-recovery/templates/email-default-content.php
    • > /wp-content/plugins/cart-recovery/templates/admin-notification-email.php
    • > /wp-content/plugins/cart-recovery/templates/email-cart-footer.php
    • > /wp-content/plugins/cart-recovery/templates/email-cart-empty-image-cell.php
    • > /wp-content/plugins/cart-recovery/templates/email-cart-header.php
    • > /wp-content/plugins/cart-recovery/templates/admin-email-tag-list-item.php
    • > /wp-content/plugins/cart-recovery/templates/admin-footer.php
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Gamajo\\TemplateLoader' not found in wp-content/plugins/cart-recovery/classes/TemplateLoader.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cart-recovery/templates/admin-intro-main.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cart-recovery/templates/admin-footer-status.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Ademti\\Crfw\\Engines\\AbstractEngine' not found in wp-content/plugins/cart-recovery/classes/Engines/Edd.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cart-recovery/templates/admin-footer-main.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cart-recovery/templates/admin-intro-email.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Ademti\\Crfw\\Engines\\AbstractEngine' not found in wp-content/plugins/cart-recovery/classes/Engines/Wpecommerce.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cart-recovery/templates/admin-email-tag-list.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cart-recovery/templates/admin-recovered-cart-notification-email.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/cart-recovery/templates/admin-header.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
9 plugin tags: woocommerce, cart, email, e-commerce, abandoned...

cart-recovery/cart-recovery-for-wordpress.php 85% from 13 tests

"Cart recovery for WordPress" version 3.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("6.0" instead of "7.1")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cart-recovery.php" instead of "cart-recovery-for-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin26,211 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1974259317,436
PHP599712,2064,645
JSON5003,610
CSS49443281
LESS1100141
Markdown130071
XML10026
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.89
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes27
▷ Abstract classes27.41%
▷ Concrete classes2592.59%
▷ Final classes00.00%
Methods308
▷ Static methods185.84%
▷ Public methods21469.48%
▷ Protected methods3912.66%
▷ Private methods5517.86%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.98MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png160.40KB62.09KB▼ 61.29%
assets/screenshot-3.png170.99KB49.75KB▼ 70.90%
assets/screenshot-2.png178.76KB59.27KB▼ 66.84%
assets/screenshot-1.png57.32KB19.75KB▼ 65.54%
assets/icon-256x256.png0.86KB0.81KB▼ 5.99%