84% email-templates

Code Review | Email Templates Customizer and Designer for WordPress and WooCommerce

WordPress plugin Email Templates Customizer and Designer for WordPress and WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: email-templates
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2015
  • Latest release: Nov 6, 2023
  • Number of updates: 51
  • Update frequency: every 59.8 days
  • Top authors: timersys (64.71%)wpexpertsio (37.25%)

Code review

54 tests

User reviews

123 reviews

Install metrics

30,000+ active /371,008 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.68ms] Passed 4 tests

Analyzing server-side resources used by Email Templates Customizer and Designer for WordPress and WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.54 ▼2.92
Dashboard /wp-admin3.35 ▲0.0148.25 ▼11.09
Posts /wp-admin/edit.php3.46 ▲0.1148.72 ▲0.93
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.43 ▼14.76
Media Library /wp-admin/upload.php3.27 ▲0.0431.62 ▼1.94

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 161 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Email Templates Customizer and Designer for WordPress and WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲10314.32 ▼0.041.60 ▼0.1943.59 ▼0.29
Dashboard /wp-admin2,249 ▲695.72 ▲0.07105.15 ▲6.1242.34 ▼1.51
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0043.32 ▲8.0436.23 ▲0.61
Add New Post /wp-admin/post-new.php1,539 ▲1023.17 ▼0.02627.55 ▼42.7751.21 ▼1.56
Media Library /wp-admin/upload.php1,419 ▲194.21 ▲0.00102.08 ▲5.7043.05 ▲0.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/email-templates/includes/customize-controls/class-font-size-customize-control.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/email-templates/admin/test.php:134
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/email-templates/includes/customize-controls/class-send-mail-customize-control.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Mailtpl' not found in wp-content/plugins/email-templates/admin/templates/default.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_customize_preview() in wp-content/plugins/email-templates/admin/templates/partials/email-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/email-templates/admin/templates/partials/default-message.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #10, #11, #12, #13, #14, #8, #9 in email-templates/assets to your readme.txt
The official readme.txt might help

email-templates/email-templates.php Passed 13 tests

The entry point to "Email Templates Customizer and Designer for WordPress and WooCommerce" version 1.4.3 is a PHP file that has certain tags in its header comment area
33 characters long description:
Beautify WordPress default emails

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin10,343 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP641,0142,9988,678
CSS665118811
JavaScript7126111646
PO File14660120
SVG20045
XML10043

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 117)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.42
▷ Minimum class complexity1.00
▷ Maximum class complexity169.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity117.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods193
▷ Static methods6734.72%
▷ Public methods16887.05%
▷ Protected methods00.00%
▷ Private methods2512.95%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
53 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/white/facebook.png0.65KB0.62KB▼ 4.81%
assets/images/white/linkedin.png0.77KB0.78KB0.00%
assets/images/black/digg.png0.46KB0.38KB▼ 18.74%
assets/images/white/pinterest.png1.31KB1.24KB▼ 5.51%
assets/images/black/twitter.png0.86KB0.90KB0.00%