67% elex-abandoned-cart-recovery-with-dynamic-coupons

Code Review | ELEX WooCommerce Abandoned Cart Recovery with Dynamic Coupons

WordPress plugin ELEX WooCommerce Abandoned Cart Recovery with Dynamic Coupons scored67%from 54 tests.

About plugin

  • Plugin page: elex-abandoned-ca...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 22, 2023
  • Latest release: Sep 4, 2023
  • Number of updates: 9
  • Update frequency: every 21.6 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /815 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.04ms] Passed 4 tests

Analyzing server-side resources used by ELEX WooCommerce Abandoned Cart Recovery with Dynamic Coupons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.81 ▼1.97
Dashboard /wp-admin3.31 ▲0.0147.62 ▼0.86
Posts /wp-admin/edit.php3.42 ▲0.0746.89 ▲0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.00 ▼13.57
Media Library /wp-admin/upload.php3.23 ▲0.0135.73 ▲0.70

Server storage [IO: ▲3.41MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 134 new files
Database: 4 new tables, 6 new options
New tables
wp_eh_ab_trash_table
wp_eh_ab_email_templates
wp_eh_ab_log_table
wp_eh_ab_cart_details
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by ELEX WooCommerce Abandoned Cart Recovery with Dynamic Coupons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.77 ▲0.021.75 ▼0.3042.77 ▼1.51
Dashboard /wp-admin2,212 ▲244.84 ▼0.05113.46 ▼3.4041.80 ▼6.40
Posts /wp-admin/edit.php2,095 ▲32.01 ▼0.0235.98 ▲0.7235.45 ▲2.12
Add New Post /wp-admin/post-new.php1,539 ▲1823.10 ▼0.06727.55 ▲52.7855.87 ▲0.15
Media Library /wp-admin/upload.php1,397 ▲124.20 ▼0.1194.02 ▼18.9241.34 ▼13.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • wp_eh_ab_cart_details
    • wp_eh_ab_log_table
    • wp_eh_ab_email_templates
    • wp_eh_ab_trash_table
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/includes/email/CouponCodeHtml.php
    • > /wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/review_and_troubleshoot_notify/resources/logo.php
  • 28× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/includes/tables/class-elex-table-creation.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/includes/class-elex-ab-cart-action.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'AbandonedCartAction' not found in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/includes/settings/elex-dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/view/cart-details-popup.php:33
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/view/settings/email-templates.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/review_and_troubleshoot_notify/resources/review.php:58
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/includes/tables/class-elex-table-creation.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WpFluent\\QueryBuilder\\QueryBuilderHandler' not found in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/includes/wp-fluent/src/QueryBuilder/NestedCriteria.php:3
    • > PHP Warning
      Use of undefined constant OBJECT - assumed 'OBJECT' (this will throw an Error in a future version of PHP) in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/view/settings/email-settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WpFluent\\QueryBuilder\\QueryBuilderHandler' not found in wp-content/plugins/elex-abandoned-cart-recovery-with-dynamic-coupons/includes/wp-fluent/src/QueryBuilder/Transaction.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

elex-abandoned-cart-recovery-with-dynamic-coupons/elex-abandoned-cart-woocommerce.php 69% from 13 tests

The principal PHP file in "ELEX WooCommerce Abandoned Cart Recovery with Dynamic Coupons" v. 1.0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "2.6.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("elex-abandoned-cart-recovery-with-dynamic-coupons.php" instead of "elex-abandoned-cart-woocommerce.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 178 characters long)
  • Domain Path: The domain path is invalid: folder "/language" does not exist

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
Everything looks great! No dangerous files found in this plugin16,379 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP652,4471,92010,971
JavaScript197421313,379
CSS6346830
Sass43926572
Markdown11410484
SVG2000143

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.38
Average class complexity30.05
▷ Minimum class complexity1.00
▷ Maximum class complexity339.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes41
▷ Abstract classes12.44%
▷ Concrete classes4097.56%
▷ Final classes00.00%
Methods403
▷ Static methods4410.92%
▷ Public methods38595.53%
▷ Protected methods143.47%
▷ Private methods40.99%
Functions40
▷ Named functions410.00%
▷ Anonymous functions3690.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.54MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Images/catalog_mode.png85.64KB21.17KB▼ 75.28%
assets/Images/google_feed.png80.41KB19.81KB▼ 75.37%
assets/Images/icons/chosen-sprite.png0.53KB0.88KB0.00%
assets/Images/ab_cart.png76.09KB17.48KB▼ 77.02%
assets/Images/icons/top banner.png68.55KB19.96KB▼ 70.88%