78% email-customizer-for-woocommerce

Code Review | Email Customizer for WooCommerce | Drag and Drop Email Templates Builder

WordPress plugin Email Customizer for WooCommerce | Drag and Drop Email Templates Builder scored78%from 54 tests.

About plugin

  • Plugin page: email-customizer-...
  • Plugin version: 2.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 26, 2019
  • Latest release: Nov 7, 2023
  • Number of updates: 75
  • Update frequency: every 21.3 days
  • Top authors: ThemeHigh (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

10,000+ active /161,952 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Email Customizer for WooCommerce | Drag and Drop Email Templates Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.91 ▼4.61
Dashboard /wp-admin3.31 ▼0.0447.21 ▼14.13
Posts /wp-admin/edit.php3.36 ▲0.0042.76 ▼4.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.52 ▼15.86
Media Library /wp-admin/upload.php3.23 ▲0.0034.37 ▲1.59

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 153 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Email Customizer for WooCommerce | Drag and Drop Email Templates Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.32 ▼0.031.90 ▲0.1943.90 ▲0.68
Dashboard /wp-admin2,198 ▲235.64 ▲0.0288.36 ▼33.2744.08 ▲1.91
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0837.00 ▲0.6633.33 ▼0.96
Add New Post /wp-admin/post-new.php1,526 ▼923.42 ▲5.04687.90 ▲34.8468.45 ▲5.19
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0095.89 ▼4.3540.41 ▼6.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 9× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_processing_order.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_refunded_order.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_completed_order.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_invoice.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_note.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/admin_cancelled_order.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/admin_new_order.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_on_hold_order.php
    • > /wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/admin_failed_order.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_note.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_refunded_order.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_new_account.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_on_hold_order.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/admin_cancelled_order.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/admin_failed_order.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_reset_password.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_processing_order.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_completed_order.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/email-customizer-for-woocommerce/classes/inc/templates/customer_invoice.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
5 plugin tags: woocommerce email customizer, woocommerce transactional emails, email customizer, email template, email designer

email-customizer-for-woocommerce/email-customizer-for-woocommerce.php 77% from 13 tests

The main PHP script in "Email Customizer for WooCommerce | Drag and Drop Email Templates Builder" version 2.6.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.9" instead of "3.0.0")
  • Domain Path: The domain path folder does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected6,993 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP184707864,123
SVG5956522,866
JavaScript3003
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity68.50
▷ Minimum class complexity4.00
▷ Maximum class complexity139.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods187
▷ Static methods4524.06%
▷ Public methods16085.56%
▷ Protected methods21.07%
▷ Private methods2513.37%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants857.14%
▷ Class constants642.86%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
68 compressed PNG files occupy 0.36MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/social-icons/youtube-color-fill-square.png2.76KB2.76KB0.00%
assets/images/social-icons/messenger-color.png2.14KB2.14KB0.00%
assets/images/linkedin.png4.32KB2.65KB▼ 38.72%
assets/images/product.png44.26KB29.65KB▼ 33.00%
assets/images/social-icons/linkedin-color-fill-square.png2.47KB2.47KB0.00%