57% auto-mail

Code Review | Auto Mail - Abandoned Cart Recovery, Newsletter Builder & Marketing Automation for WooCommerce

WordPress plugin Auto Mail - Abandoned Cart Recovery, Newsletter Builder & Marketing Automation for WooCommerce scored57%from 54 tests.

About plugin

  • Plugin page: auto-mail
  • Plugin version: 1.1.85
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 23, 2022
  • Latest release: Dec 2, 2023
  • Number of updates: 125
  • Update frequency: every 4.5 days
  • Top authors: darell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,518 total downloads

Benchmarks

Plugin footprint 47% 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: ▲5.24MB] [CPU: ▲24.08ms] 75% from 4 tests

Analyzing server-side resources used by Auto Mail - Abandoned Cart Recovery, Newsletter Builder & Marketing Automation for WooCommerce
The following require your attention
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.24MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.23 ▲5.7775.55 ▲32.64
Dashboard /wp-admin9.25 ▲5.9196.03 ▲34.05
Posts /wp-admin/edit.php9.25 ▲5.9095.64 ▲50.73
Add New Post /wp-admin/post-new.php9.25 ▲3.3776.38 ▼19.80
Media Library /wp-admin/upload.php9.25 ▲6.0283.23 ▲49.44
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2571.67

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2,092 new files
Database: 6 new tables, 9 new options
New tables
wp_am_automation_actions
wp_am_automation_triggers
wp_am_automation_emails
wp_am_automation_actions_meta
wp_am_cart_abandonment
wp_auto_mail_queue
New WordPress options
theysaidso_admin_options
fs_active_plugins
widget_theysaidso_widget
db_upgraded
fs_accounts
widget_recent-comments
widget_recent-posts
fs_debug_mode
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Auto Mail - Abandoned Cart Recovery, Newsletter Builder & Marketing Automation for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17113.83 ▼0.4511.54 ▲9.4227.54 ▼24.79
Dashboard /wp-admin2,228 ▲535.53 ▼0.1699.04 ▼12.3346.73 ▲5.42
Posts /wp-admin/edit.php2,137 ▲342.02 ▲0.0740.28 ▼1.1049.76 ▲14.59
Add New Post /wp-admin/post-new.php1,544 ▲1822.98 ▼0.13722.56 ▲79.6250.87 ▲0.92
Media Library /wp-admin/upload.php1,433 ▲334.22 ▲0.0496.08 ▼0.7345.86 ▲1.77
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0881.6527.4130.24

Uninstaller [IO: ▲2.59MB] [DB: ▲0.01MB] 25% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/auto-mail/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall successfully, leaving 6 tables in the database
    • wp_am_automation_triggers
    • wp_am_automation_actions
    • wp_auto_mail_queue
    • wp_am_cart_abandonment
    • wp_am_automation_emails
    • wp_am_automation_actions_meta
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • fs_active_plugins
    • widget_theysaidso_widget
    • fs_debug_mode
    • db_upgraded
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/auto-mail/vendor/sendgrid/php-http-client/examples/example.php
  • 271× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > Composer autoloader not found. Execute 'composer install' in the project folder first.
    • > Composer autoloader not found. Execute 'composer install' in the project folder first.
    • > PHP Fatal error
      Uncaught Error: Class 'SendGrid\\Mail\\Content' not found in wp-content/plugins/auto-mail/vendor/sendgrid/sendgrid/lib/mail/PlainTextContent.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/auto-mail/vendor/guzzlehttp/promises/src/Promise.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/auto-mail/admin/views/form/wizard/sections/tab-save.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Auto_Mail_Admin_Addons' not found in wp-content/plugins/auto-mail/admin/views/addons/content.php:2
    • > PHP Warning
      Use of undefined constant AUTO_MAIL_URL - assumed 'AUTO_MAIL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-mail/admin/views/campaign/wizard/sections/tab-templates.php on line 24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/auto-mail/admin/views/front/template/fashion.php on line 2
    • > PHP Warning
      Use of undefined constant AUTO_MAIL_URL - assumed 'AUTO_MAIL_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-mail/admin/views/campaign/wizard/sections/tab-templates.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/auto-mail/vendor/psr/http-message/src/RequestInterface.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #2, #3, #4, #5, #6, #7, #8, #9 in auto-mail/assets to your readme.txt
The official readme.txt might help

auto-mail/auto-mail.php Passed 13 tests

The main file in "Auto Mail - Abandoned Cart Recovery, Newsletter Builder & Marketing Automation for WooCommerce" v. 1.1.85 serves as a complement to information provided in readme.txt and as the entry point to the plugin
95 characters long description:
Auto Mail - Abandoned Cart Recovery, Newsletter Builder & Marketing Automation for WooCommerce.

Code Analysis 97% from 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
No dangerous file extensions were detected133,913 lines of code in 1,880 files:
LanguageFilesBlank linesComment linesLines of code
PHP48214,23631,61362,349
JSON280055,906
CSS16882816,680
Markdown291,64204,719
JavaScript347409212,660
SVG1,278001,278
YAML6232191
XML2468083
Dockerfile29020
make29020
Bourne Shell1207

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity23.82
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces21
Interfaces26
Traits3
Classes271
▷ Abstract classes93.32%
▷ Concrete classes26296.68%
▷ Final classes3613.74%
Methods2,851
▷ Static methods39013.68%
▷ Public methods2,28480.11%
▷ Protected methods451.58%
▷ Private methods52218.31%
Functions340
▷ Named functions21864.12%
▷ Anonymous functions12235.88%
Constants257
▷ Global constants11042.80%
▷ Class constants14757.20%
▷ Public constants13692.52%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
88 PNG files occupy 14.48MB with 5.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/actions/activecampaign.png2.96KB1.36KB▼ 53.91%
assets/images/preview/lawyer.png592.77KB643.13KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/images/form/thumbnail/auto-mail-minimal.png369.35KB98.60KB▼ 73.30%
assets/images/providers/aws.png56.24KB51.28KB▼ 8.83%