78% email-customizer-and-designer-for-woocommerce

Code Review | WooCommerce Email Customizer - Email Template Customizer and Designer with Drag and Drop Email Templates Builder

WordPress plugin WooCommerce Email Customizer - Email Template Customizer and Designer with Drag and Drop Email Templates Builder scored78%from 54 tests.

About plugin

  • Plugin page: email-customizer-...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jul 1, 2022
  • Latest release: Oct 18, 2023
  • Number of updates: 14
  • Update frequency: every 33.9 days
  • Top authors: acowebscd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,733 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.58MB] [CPU: ▲0.55ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Email Customizer - Email Template Customizer and Designer with Drag and Drop Email Templates Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5548.43 ▲7.74
Dashboard /wp-admin3.92 ▲0.5755.35 ▼9.65
Posts /wp-admin/edit.php4.01 ▲0.6558.41 ▲12.26
Add New Post /wp-admin/post-new.php6.50 ▲0.6191.33 ▼8.14
Media Library /wp-admin/upload.php3.82 ▲0.5850.37 ▲14.20

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

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

Browser metrics Passed 4 tests

WooCommerce Email Customizer - Email Template Customizer and Designer with Drag and Drop Email Templates Builder: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.34 ▼0.011.60 ▼0.0240.55 ▼3.46
Dashboard /wp-admin2,200 ▲235.52 ▼0.0391.57 ▼5.8238.31 ▼8.75
Posts /wp-admin/edit.php2,105 ▲22.01 ▼0.0039.26 ▲0.1436.88 ▼1.40
Add New Post /wp-admin/post-new.php1,531 ▲523.70 ▲0.73671.85 ▼0.6264.50 ▲6.43
Media Library /wp-admin/upload.php1,467 ▲674.17 ▼0.09106.50 ▲6.7645.80 ▲0.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/email-customizer-and-designer-for-woocommerce/includes/views/admin-root.php
    • > /wp-content/plugins/email-customizer-and-designer-for-woocommerce/includes/views/admin-global-style.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/email-customizer-and-designer-for-woocommerce/start.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

email-customizer-and-designer-for-woocommerce/start.php 92% from 13 tests

The main PHP script in "WooCommerce Email Customizer - Email Template Customizer and Designer with Drag and Drop Email Templates Builder" version 1.0.8 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("email-customizer-and-designer-for-woocommerce.php" instead of "start.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,641 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
PHP63405423,359
JSON100882
SVG9400705
PO File1292292596
JavaScript30286
CSS113113

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 169)
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity157.00
▷ Minimum class complexity19.00
▷ Maximum class complexity309.00
Average method complexity7.59
▷ Minimum method complexity1.00
▷ Maximum method complexity169.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods72
▷ Static methods45.56%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/instagram.png2.17KB1.79KB▼ 17.60%
assets/images/gmail.png0.83KB0.53KB▼ 36.31%
assets/images/twitter.png0.87KB0.56KB▼ 35.50%
assets/images/youtube.png0.80KB0.50KB▼ 37.42%
assets/images/pinterest.png1.06KB0.63KB▼ 40.13%