78% emailkit

Code Review | EmailKit -WooCommerce Email Customizer

WordPress plugin EmailKit -WooCommerce Email Customizer scored78%from 54 tests.

About plugin

  • Plugin page: emailkit
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 11, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 6
  • Update frequency: every 8.8 days
  • Top authors: xpeedstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /149 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
Installer ran successfully

Server metrics [RAM: ▲0.96MB] [CPU: ▲15.73ms] Passed 4 tests

This is a short check of server-side resources used by EmailKit -WooCommerce Email Customizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9656.87 ▲20.05
Dashboard /wp-admin4.29 ▲0.9475.94 ▲12.95
Posts /wp-admin/edit.php4.32 ▲0.9674.25 ▲23.94
Add New Post /wp-admin/post-new.php6.89 ▲1.00110.23 ▲5.98
Media Library /wp-admin/upload.php4.22 ▲0.9961.95 ▲28.76

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 134 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
emailkit_installed
emailkit_version
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

EmailKit -WooCommerce Email Customizer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲6214.71 ▲0.001.59 ▼0.2639.25 ▲1.25
Dashboard /wp-admin2,236 ▲595.62 ▲0.0395.17 ▼8.5243.39 ▼3.05
Posts /wp-admin/edit.php2,138 ▲382.02 ▲0.0141.52 ▼0.0336.87 ▼1.70
Add New Post /wp-admin/post-new.php1,569 ▲3424.79 ▲6.32605.78 ▼48.8263.25 ▼1.51
Media Library /wp-admin/upload.php1,444 ▲504.19 ▲0.0099.30 ▲1.9443.52 ▲4.08

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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • emailkit_version
    • theysaidso_admin_options
    • emailkit_installed
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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)
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
Almost there! Just fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/emailkit/includes/Admin/EmailKitEditor/EmailKitEditorInit.php
    • > /wp-content/plugins/emailkit/build/server/pages/editor.php
    • > /wp-content/plugins/emailkit/includes/Admin/Emails/Helpers/Notice/Notice.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/emailkit/includes/views/modal-form-template-item.php:1

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: email template, customize woocommerce emails, woocommerce email customizer, email builder

emailkit/EmailKit.php 92% from 13 tests

This is the main PHP file of "EmailKit -WooCommerce Email Customizer" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("emailkit.php" instead of "EmailKit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin50,914 lines of code in 118 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2558032944,769
PHP499396133,896
CSS6320342,145
XML1154233
JSON210031
SVG20124
HTML140016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.46
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces13
Interfaces0
Traits0
Classes41
▷ Abstract classes00.00%
▷ Concrete classes41100.00%
▷ Final classes12.44%
Methods151
▷ Static methods3120.53%
▷ Public methods14696.69%
▷ Protected methods21.32%
▷ Private methods31.99%
Functions14
▷ Named functions17.14%
▷ Anonymous functions1392.86%
Constants35
▷ Global constants925.71%
▷ Class constants2674.29%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/dist/admin/images/email-builder.png1.53KB1.50KB▼ 1.92%