73% email-customizer-woocommerce

Code Review | Visual Email Designer for WooCommerce

WordPress plugin Visual Email Designer for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: email-customizer-...
  • Plugin version: 1.7.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 13, 2015
  • Latest release: Nov 21, 2022
  • Number of updates: 45
  • Update frequency: every 57.0 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

60+ active /24,702 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.83MB] [CPU: ▼5.24ms] Passed 4 tests

Server-side resources used by Visual Email Designer for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8341.04 ▼1.75
Dashboard /wp-admin4.19 ▲0.8448.14 ▼11.58
Posts /wp-admin/edit.php4.24 ▲0.8853.79 ▲8.11
Add New Post /wp-admin/post-new.php6.71 ▲0.8281.39 ▼12.77
Media Library /wp-admin/upload.php4.05 ▲0.8237.86 ▲5.15
Order Based Template /wp-admin/admin.php?page=manage-email5.5140.48
Template Menu /wp-admin/admin.php?page=manage-template5.5140.01

Server storage [IO: ▲8.37MB] [DB: ▲0.27MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 176 new files
Database: 3 new tables, 7 new options
New tables
wp_email_log
wp_sm_email_table
wp_test_table
New WordPress options
wordpress_email_customizer_pro_version
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Visual Email Designer for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.29 ▼1.485.14 ▲3.2639.38 ▼5.41
Dashboard /wp-admin2,235 ▲504.94 ▼0.9297.87 ▼15.9776.65 ▲40.58
Posts /wp-admin/edit.php2,121 ▲291.99 ▼0.0637.82 ▼6.9133.61 ▼4.44
Add New Post /wp-admin/post-new.php1,545 ▲2618.51 ▼4.68655.89 ▼36.9164.82 ▲6.53
Media Library /wp-admin/upload.php1,408 ▲204.08 ▼0.12103.12 ▼7.9979.33 ▲34.04
Order Based Template /wp-admin/admin.php?page=manage-email2,2344.91220.0496.96
Template Menu /wp-admin/admin.php?page=manage-template9434.89191.5522.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_test_table
    • wp_email_log
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • wordpress_email_customizer_pro_version
    • widget_recent-comments

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-template
    • > Console-api (severe) in wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1+4:846966
    TypeError: Cannot read properties of null (reading 'appendChild')\n at Zc.attachToDom (/wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:444462)\n at ah.render (/wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:469418)\n at ah.render (/wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:528180)\n at ah.\u003Canonymous> (/wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:145744)\n at ah.fire (/wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:137014)\n at \u003Ccomputed> [as render] (/wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:145795)\n at sh.init (/wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:526591)\n at /wp-content/plugins/email-customizer-woocommerce/assets/ckeditor5-build-classic/build/ckeditor.js?ver=6.3.1:5:529148
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-template
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/email-customizer-woocommerce/assets/js/smack-woocommerce-custom-mail.js?ver=6.3.1:434:27)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-template
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/email-customizer-woocommerce/assets/js/smack-woocommerce-custom-mail.js?ver=6.3.1:469:28)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-template
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/email-customizer-woocommerce/assets/js/smack-woocommerce-custom-mail.js?ver=6.3.1:504:27)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-template
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/email-customizer-woocommerce/assets/js/smack-woocommerce-custom-mail.js?ver=6.3.1:422:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage-template
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).sortable is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (List of the WooCommerce Order templates.), #2 (Preview of WooCommerce Order based template design.), #3 (Drag "n" Drop view of template design.)
Please take inspiration from this readme.txt

email-customizer-woocommerce/email-customizer-woocommerce.php 92% from 13 tests

The entry point to "Visual Email Designer for WooCommerce" version 1.7.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin59,242 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,54537922,264
CSS53,61015914,320
JavaScript91,13546411,552
SVG3009,552
PO File65981,4421,474
JSON10080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity49.64
▷ Minimum class complexity2.00
▷ Maximum class complexity247.00
Average method complexity6.61
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods122
▷ Static methods7158.20%
▷ Public methods122100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
92 PNG files occupy 2.12MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/email-customization-icon-03.png0.55KB0.42KB▼ 23.58%
assets/images/facebook.png3.27KB3.18KB▼ 2.75%
assets/images/logo3.png18.74KB5.70KB▼ 69.59%
assets/images/theme4blog.png8.57KB8.35KB▼ 2.64%
assets/images/text.png1.99KB0.98KB▼ 50.69%