77% wp-html-mail

Code Review | Email Template Designer - WP HTML Mail

WordPress plugin Email Template Designer - WP HTML Mail scored77%from 54 tests.

About plugin

  • Plugin page: wp-html-mail
  • Plugin version: 3.4.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2015
  • Latest release: Oct 2, 2023
  • Number of updates: 109
  • Update frequency: every 29.1 days
  • Top authors: haet (100%)

Code review

54 tests

User reviews

79 reviews

Install metrics

20,000+ active /568,348 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.00ms] 75% from 4 tests

Server-side resources used by Email Template Designer - WP HTML Mail
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,031.24ms on /wp-admin/options-general.php?page=wp-html-mail)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.99 ▼1.93
Dashboard /wp-admin3.36 ▲0.0548.29 ▲1.29
Posts /wp-admin/edit.php3.46 ▲0.1149.09 ▲5.11
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.13 ▲1.32
Media Library /wp-admin/upload.php3.27 ▲0.0436.64 ▲3.31
Email template /wp-admin/options-general.php?page=wp-html-mail3.812,031.24

Server storage [IO: ▲1.84MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 404 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
haet_mail_options
haet_mail_plugin_options
theysaidso_admin_options
db_upgraded
can_compress_scripts
haet_mail_theme_options
widget_recent-comments

Browser metrics Passed 4 tests

Email Template Designer - WP HTML Mail: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.34 ▼1.031.99 ▲0.3039.30 ▲1.03
Dashboard /wp-admin2,210 ▲225.81 ▲0.9494.20 ▼11.2237.55 ▼6.35
Posts /wp-admin/edit.php2,093 ▲252.05 ▲0.0340.99 ▲6.4834.65 ▲1.19
Add New Post /wp-admin/post-new.php1,550 ▲3618.64 ▲0.98625.42 ▼26.0762.47 ▲1.95
Media Library /wp-admin/upload.php1,392 ▲14.18 ▼0.0692.95 ▼5.4142.87 ▼3.57
Email template /wp-admin/options-general.php?page=wp-html-mail1,92413.84267.44173.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • haet_mail_plugin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • haet_mail_theme_options
    • widget_recent-comments
    • haet_mail_options
    • theysaidso_admin_options

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
Even though everything seems fine, this is not 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 fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-html-mail/vendor/sabberworm/php-css-parser/tests/quickdump.php
    • > /wp-content/plugins/wp-html-mail/views/admin/settings-template.php
  • 83× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/wp-html-mail/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Property/CSSNamespace.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/wp-html-mail/vendor/symfony/css-selector/Parser/Handler/HashHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/wp-html-mail/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Property/AtRule.php:8
    • > PHP Warning
      require(wp-content/plugins/wp-html-mail/vendor/voku/simple_html_dom/build/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wp-html-mail/vendor/voku/simple_html_dom/build/generate_docs.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' not found in wp-content/plugins/wp-html-mail/vendor/symfony/css-selector/XPath/Extension/AbstractExtension.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/wp-html-mail/vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/wp-html-mail/vendor/symfony/css-selector/XPath/Extension/CombinationExtension.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleXmlDomNode' not found in wp-content/plugins/wp-html-mail/vendor/voku/simple_html_dom/src/voku/helper/SimpleXmlDomNodeBlank.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleHtmlDom' not found in wp-content/plugins/wp-html-mail/vendor/voku/simple_html_dom/src/voku/helper/SimpleHtmlDomBlank.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\ode\odeInterface' not found in wp-content/plugins/wp-html-mail/vendor/symfony/css-selector/Node/AbstractNode.php:24

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Screenshots: Please add images for these screenshots: #1 (Our template library), #2 (Use text or image header), #3 (set global font settings), #4 (append you contact details to the mail footer), #5 (turn template on and off for supported plugins)
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

wp-html-mail/wp-html-mail.php Passed 13 tests

This is the main PHP file of "Email Template Designer - WP HTML Mail" version 3.4.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
80 characters long description:
Create your own professional email design for all your outgoing WordPress emails

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin18,426 lines of code in 238 files:
LanguageFilesBlank linesComment linesLines of code
PHP1613,2156,26914,002
Markdown855811,519
PO File44205261,048
JavaScript811073788
JSON700450
CSS454619311
HTML1498289
XML20011
SVG2008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.53
▷ Minimum class complexity1.00
▷ Maximum class complexity167.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces21
Interfaces15
Traits0
Classes135
▷ Abstract classes1410.37%
▷ Concrete classes12189.63%
▷ Final classes43.31%
Methods1,341
▷ Static methods705.22%
▷ Public methods1,24092.47%
▷ Protected methods392.91%
▷ Private methods624.62%
Functions44
▷ Named functions613.64%
▷ Anonymous functions3886.36%
Constants25
▷ Global constants28.00%
▷ Class constants2392.00%
▷ Public constants23100.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
146 PNG files occupy 0.61MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/socialicons/flaticon-square-color/flickr-32.png0.40KB0.35KB▼ 13.17%
images/socialicons/kulesza-circle-black/facebook-24.png0.46KB0.32KB▼ 30.85%
images/wpforo-logo.png4.54KB4.73KB0.00%
images/socialicons/kulesza-black/Element 3-32.png0.51KB0.33KB▼ 35.58%
images/socialicons/kulesza-black/Element 8-24.png0.57KB0.37KB▼ 35.54%