84% email-template-customizer-for-woo

Code Review | Email Template Customizer for WooCommerce

WordPress plugin Email Template Customizer for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: email-template-cu...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.0
  • WordPress version: 6.3.1
  • First release: Sep 12, 2020
  • Latest release: Dec 1, 2023
  • Number of updates: 128
  • Update frequency: every 9.7 days
  • Top authors: thanhtd (61.72%)villatheme (28.13%)dragonlord47 (10.94%)kimvt1991 (1.56%)

Code review

54 tests

User reviews

92 reviews

Install metrics

20,000+ active /408,067 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
This plugin's installer ran successfully

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

Server-side resources used by Email Template Customizer for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.31 ▼5.56
Dashboard /wp-admin3.31 ▼0.0444.66 ▼18.24
Posts /wp-admin/edit.php3.36 ▲0.0044.43 ▼1.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.93 ▼5.84
Media Library /wp-admin/upload.php3.23 ▲0.0033.51 ▲0.07

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

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

Browser metrics Passed 4 tests

Email Template Customizer for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▲0.331.67 ▼0.1039.16 ▼6.17
Dashboard /wp-admin2,198 ▲185.64 ▼0.0292.15 ▼6.9544.19 ▼3.50
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0240.64 ▲3.7936.01 ▼1.02
Add New Post /wp-admin/post-new.php1,526 ▼023.32 ▲0.03615.75 ▼24.3745.69 ▲1.91
Media Library /wp-admin/upload.php1,400 ▲94.21 ▲0.0494.19 ▼8.6840.06 ▼3.50

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/email-template-customizer-for-woo/includes/templates/email-template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/email-template-customizer-for-woo/includes/support/survey.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: The official readme.txt might help

email-template-customizer-for-woo/email-template-customizer-for-woo.php 92% from 13 tests

The main PHP script in "Email Template Customizer for WooCommerce" version 1.2.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin17,982 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP279661346,033
JavaScript124741124,258
SVG40123,847
CSS15116841,741
Sass2373181,641
PO File1216341462

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity56.54
▷ Minimum class complexity1.00
▷ Maximum class complexity244.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods193
▷ Static methods3518.13%
▷ Public methods18294.30%
▷ Protected methods21.04%
▷ Private methods94.66%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants13
▷ Global constants13100.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
113 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/yt-black-border.png0.86KB0.46KB▼ 47.06%
assets/img/home-white-black.png0.47KB0.29KB▼ 38.43%
assets/img/yt-color-white.png0.61KB0.40KB▼ 34.99%
assets/img/home-black-border.png0.46KB0.31KB▼ 31.55%
assets/img/twi-cyan.png0.73KB0.42KB▼ 42.80%