78% email-customizer

Code Review | Email Customizer

WordPress plugin Email Customizer scored78%from 54 tests.

About plugin

  • Plugin page: email-customizer
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Nov 2, 2020
  • Latest release: Aug 20, 2023
  • Number of updates: 10
  • Update frequency: every 102.4 days
  • Top authors: picocodes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,759 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
Install script ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼0.75ms] Passed 4 tests

Server-side resources used by Email Customizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3838.30 ▼2.92
Dashboard /wp-admin3.69 ▲0.3851.86 ▲5.08
Posts /wp-admin/edit.php3.74 ▲0.3846.49 ▼3.79
Add New Post /wp-admin/post-new.php6.21 ▲0.3292.54 ▲3.47
Media Library /wp-admin/upload.php3.55 ▲0.3233.94 ▲0.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 131 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
email-customizer-redirected
widget_theysaidso_widget
email_customizer
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Email Customizer: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.56 ▲0.001.70 ▲0.0445.80 ▲2.55
Dashboard /wp-admin2,196 ▲195.60 ▲0.0281.99 ▼18.0536.41 ▼6.11
Posts /wp-admin/edit.php2,104 ▲11.99 ▲0.0433.04 ▼7.5935.99 ▼1.88
Add New Post /wp-admin/post-new.php1,536 ▲123.20 ▲5.12655.25 ▲44.0156.36 ▼5.03
Media Library /wp-admin/upload.php1,398 ▼24.25 ▲0.0496.86 ▼0.1642.76 ▲1.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • email-customizer-redirected
    • can_compress_scripts
    • email_customizer
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/email-customizer/includes/template/content-bottom.php
  • 65× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Tests/Parser/Shortcut/EmptyStringParserTest.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\\Parser\\Handler\\AbstractHandlerTest' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Tests/Node/SpecificityTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Node/SelectorNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Exception\\ParseException' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Exception/ExpressionErrorException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/XPath/Extension/CombinationExtension.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\ode\\AbstractNodeTest' not found in wp-content/plugins/email-customizer/vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: html emails, email template, email customizer, email, email designer

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

The main file in "Email Customizer" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin6,973 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP1061,5283,4716,293
HTML200356
JSON100130
JavaScript23533114
CSS17039
Markdown26030
XML10011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.45
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces21
Interfaces6
Traits0
Classes85
▷ Abstract classes44.71%
▷ Concrete classes8195.29%
▷ Final classes22.47%
Methods515
▷ Static methods5610.87%
▷ Public methods48594.17%
▷ Protected methods152.91%
▷ Private methods152.91%
Functions15
▷ Named functions746.67%
▷ Anonymous functions853.33%
Constants13
▷ Global constants00.00%
▷ Class constants13100.00%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/twitter-white.png0.58KB0.58KB▼ 0.67%
includes/assets/facebook-white.png0.36KB0.17KB▼ 51.62%
includes/assets/twitter-black.png0.54KB0.58KB0.00%
includes/assets/instagram-black.png0.61KB0.63KB0.00%
includes/assets/facebook-black.png0.35KB0.17KB▼ 49.86%