83% make-email-customizer-for-woocommerce

Code Review | Make Email Customizer for WooCommerce

WordPress plugin Make Email Customizer for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: make-email-custom...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2020
  • Latest release: Dec 27, 2022
  • Number of updates: 13
  • Update frequency: every 61.8 days
  • Top authors: excellentdynamics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /732 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.19ms] Passed 4 tests

Analyzing server-side resources used by Make Email Customizer for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.24 ▲4.45
Dashboard /wp-admin3.31 ▲0.0042.42 ▼2.59
Posts /wp-admin/edit.php3.36 ▲0.0048.89 ▲4.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.82 ▼5.31
Media Library /wp-admin/upload.php3.23 ▲0.0038.27 ▲5.79

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 128 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Make Email 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,813 ▲4213.24 ▼1.342.13 ▼0.1942.11 ▼11.76
Dashboard /wp-admin2,216 ▲255.85 ▼0.06110.92 ▲6.5746.54 ▲4.07
Posts /wp-admin/edit.php2,105 ▲162.02 ▲0.0439.77 ▲4.3034.88 ▲2.54
Add New Post /wp-admin/post-new.php1,546 ▲2723.34 ▲0.15595.52 ▼76.5652.04 ▼11.31
Media Library /wp-admin/upload.php1,404 ▲134.20 ▼0.0395.71 ▼7.9143.70 ▼0.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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 take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function mailer() on null in wp-content/plugins/make-email-customizer-for-woocommerce/pages/ec-admin-page.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' not found in wp-content/plugins/make-email-customizer-for-woocommerce/includes/Emogrifier/Emogrifier/HtmlProcessor/CssToAttributeConverter.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/make-email-customizer-for-woocommerce/includes/ec-shortcodes.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/make-email-customizer-for-woocommerce/pages/ec-preview-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' not found in wp-content/plugins/make-email-customizer-for-woocommerce/includes/Emogrifier/Emogrifier/HtmlProcessor/HtmlNormalizer.php:16

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 83% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #3 (Screenshot of option page of Email Customizer Yellow Theme), #4 (Screenshot of option page of Email Customizer Pink Theme)
The official readme.txt might help

make-email-customizer-for-woocommerce/make.php 77% from 13 tests

This is the main PHP file of "Make Email Customizer for WooCommerce" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("make-email-customizer-for-woocommerce.php" instead of "make.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected9,422 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP552,0173,6097,616
PO File1196263525
JavaScript1220105505
CSS77368374
HTML1110311
JSON10070
SVG19021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity59.45
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods249
▷ Static methods3714.86%
▷ Public methods11947.79%
▷ Protected methods62.41%
▷ Private methods12449.80%
Functions31
▷ Named functions2580.65%
▷ Anonymous functions619.35%
Constants29
▷ Global constants517.24%
▷ Class constants2482.76%
▷ Public constants24100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 1.59MB with 1.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png386.24KB161.12KB▼ 58.28%
screenshot-3.png377.20KB154.91KB▼ 58.93%
screenshot-4.png428.26KB171.52KB▼ 59.95%
assets/images/help-icon.png14.73KB0.22KB▼ 98.48%
assets/images/pe-icon.png1.18KB0.43KB▼ 63.61%