84% conditional-marketing-mailer

Code Review | WooCommerce Email Marketing & Cart Abandonment Recovery

WordPress plugin WooCommerce Email Marketing & Cart Abandonment Recovery scored84%from 54 tests.

About plugin

  • Plugin page: conditional-marke...
  • Plugin version: 2.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 9, 2020
  • Latest release: Oct 3, 2023
  • Number of updates: 27
  • Update frequency: every 43.9 days
  • Top authors: wp-buy (62.96%)osamaesh (40.74%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.60MB] [CPU: ▼16.02ms] Passed 4 tests

A check of server-side resources used by WooCommerce Email Marketing & Cart Abandonment Recovery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.68 ▲4.46
Dashboard /wp-admin3.37 ▲0.0757.33 ▲4.74
Posts /wp-admin/edit.php3.49 ▲0.1347.43 ▼7.89
Add New Post /wp-admin/post-new.php3.25 ▼2.6338.45 ▼59.35
Media Library /wp-admin/upload.php3.30 ▲0.0735.66 ▼1.30
Conditions list /wp-admin/edit.php?post_type=wcmm3.3235.27
Add New /wp-admin/post-new.php?post_type=wcmm3.3242.27

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Email Marketing & Cart Abandonment Recovery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.31 ▼0.252.05 ▲0.2643.62 ▼0.43
Dashboard /wp-admin2,222 ▲455.63 ▼0.0585.09 ▼6.3138.90 ▼5.12
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0334.98 ▼6.4434.45 ▼6.01
Add New Post /wp-admin/post-new.php1,558 ▲3218.48 ▼4.52649.03 ▼34.1467.29 ▲15.67
Media Library /wp-admin/upload.php1,427 ▲304.25 ▲0.0695.88 ▼13.5543.96 ▼2.42
Conditions list /wp-admin/edit.php?post_type=wcmm7631.517.8116.03
Add New /wp-admin/post-new.php?post_type=wcmm7741.527.0037.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-marketing-mailer/admin/cron.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/conditional-marketing-mailer/woo-conditional-marketing-mailer.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-marketing-mailer/admin/setting.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-marketing-mailer/admin/post_type.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-marketing-mailer/admin/metaBox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-marketing-mailer/admin/testing-massage.php:10

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: abandonment, conditions, woocommerce, campaign, cart abandonment recovery...

conditional-marketing-mailer/woo-conditional-marketing-mailer.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Email Marketing & Cart Abandonment Recovery" version 2.6
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("conditional-marketing-mailer.php" instead of "woo-conditional-marketing-mailer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin16,602 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript652,5797839,768
CSS9376465,060
PHP8332761,774

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity20.57
▷ Minimum class complexity6.00
▷ Maximum class complexity69.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods58
▷ Static methods23.45%
▷ Public methods5594.83%
▷ Protected methods00.00%
▷ Private methods35.17%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
notifications/icon-128x128.png2.95KB2.74KB▼ 7.24%