68% email-creatior

Code Review | WooCommerce Email Template Customizer - Email Creator

WordPress plugin WooCommerce Email Template Customizer - Email Creator scored68%from 54 tests.

About plugin

  • Plugin page: email-creatior
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2022
  • Latest release: Nov 16, 2022
  • Number of updates: 47
  • Update frequency: every 2.1 days
  • Top authors: wiloke (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /8,230 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼8.00ms] Passed 4 tests

Server-side resources used by WooCommerce Email Template Customizer - Email Creator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1041.91 ▼3.63
Dashboard /wp-admin3.47 ▲0.1255.81 ▼13.61
Posts /wp-admin/edit.php3.53 ▲0.1654.04 ▲4.54
Add New Post /wp-admin/post-new.php5.99 ▲0.1096.23 ▼14.85
Media Library /wp-admin/upload.php3.33 ▲0.1037.62 ▲0.10

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Email Template Customizer - Email Creator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.26 ▼0.101.75 ▲0.0639.43 ▼2.07
Dashboard /wp-admin2,203 ▲295.56 ▼0.0282.83 ▼10.1943.66 ▲3.54
Posts /wp-admin/edit.php2,112 ▲122.03 ▼0.0040.05 ▲1.0037.57 ▲2.79
Add New Post /wp-admin/post-new.php1,532 ▲423.61 ▲0.53694.12 ▼3.1559.22 ▲3.72
Media Library /wp-admin/upload.php1,411 ▲114.28 ▲0.1098.63 ▼14.4646.90 ▼2.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/hello.php
    • > /wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/wiloke.php
    • > /wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/index.php
  • 336× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/email-creatior/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Helper\\Helper' not found in wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/vendor/symfony/console/Symfony/Component/Console/Helper/QuestionHelper.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php:16
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php on line 264
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/vendor/symfony/console/Symfony/Component/Console/Tests/Input/StringInputTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/components/Elementor/SampleElementor.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/email-creatior/vendor/twig/twig/src/TokenParser/SetTokenParser.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/email-creatior/src/Email/Templates/customer-reset-password.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php:17

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 90% 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
These attributes need your attention: The official readme.txt might help

email-creatior/emailcreator.php 85% from 13 tests

The entry point to "WooCommerce Email Template Customizer - Email Creator" version 1.1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 164 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("email-creatior.php" instead of "emailcreator.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/email-creatior/vendor/wilokecom/phpcli/vendor/symfony/console/Symfony/Component/Console/Resources/bin/hiddeninput.exe
41,242 lines of code in 537 files:
LanguageFilesBlank linesComment linesLines of code
PHP4617,59414,97837,439
Markdown2651201,334
JSON2700922
JavaScript1190907
XML17240434
YAML34134169
CSS14027
reStructuredText18510

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.40
▷ Minimum class complexity1.00
▷ Maximum class complexity367.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces74
Interfaces29
Traits26
Classes363
▷ Abstract classes215.79%
▷ Concrete classes34294.21%
▷ Final classes5917.25%
Methods2,812
▷ Static methods53018.85%
▷ Public methods2,38084.64%
▷ Protected methods2388.46%
▷ Private methods1946.90%
Functions255
▷ Named functions17970.20%
▷ Anonymous functions7629.80%
Constants108
▷ Global constants1513.89%
▷ Class constants9386.11%
▷ Public constants9298.92%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/Dashboard/Assets/logo.png0.39KB0.32KB▼ 19.25%