67% email-design-studio

Code Review | Email Design Studio

WordPress plugin Email Design Studio scored 67% from 54 tests.

About plugin

  • Plugin page: email-design-studio
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 5.8.1
  • First release: Nov 19, 2021
  • Latest release: Nov 19, 2021
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 101 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼155.04ms] Passed 4 tests

This is a short check of server-side resources used by Email Design Studio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0613.12 ▼9.03
Dashboard /wp-admin3.41 ▲0.3435.03 ▼4.07
Posts /wp-admin/edit.php3.20 ▲0.0918.28 ▼12.85
Add New Post /wp-admin/post-new.php5.70 ▲0.2667.50 ▼594.19
Media Library /wp-admin/upload.php3.29 ▲0.2822.17 ▼0.88
Email Design Studio /wp-admin/customize.php?sm-email-customize=1&templateid=1&themeid=14.4782.28
Email Design Studio /wp-admin/customize.php?sm-email-customize=1&emaillog=13.5849.31

Server storage [IO: ▲8.88MB] [DB: ▲0.62MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 131 new files
Database: 2 new tables, 565 new options
New tables
wp_sm_email_log
wp_sm_customiser_pro_table
New WordPress options
sm_customizer_maintext_permanent_1412
sm_customizer_maintext_permanent_722
sm_customizer_maintext_1192
sm_customizer_maintext_permanent_571
sm_mail_customer_invoice_activate_template
sm_customizer_maintext_permanent_1181
sm_customizer_maintext_permanent_1132
sm_customizer_maintext_511
sm_customizer_maintext_521
sm_customizer_maintext_1362
...

Browser metrics Passed 4 tests

A check of browser resources used by Email Design Studio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲8215.77 ▲0.098.90 ▲3.4575.25 ▲0.53
Dashboard /wp-admin2,938 ▲426.19 ▲0.04121.20 ▼12.09164.36 ▼8.47
Posts /wp-admin/edit.php2,718 ▼253.29 ▲0.0765.17 ▼4.54137.38 ▼10.60
Add New Post /wp-admin/post-new.php2,079 ▼1,62021.62 ▲3.29427.87 ▼51.76169.39 ▼6.07
Media Library /wp-admin/upload.php1,758 ▲65.72 ▲0.24117.65 ▼30.68185.57 ▲2.53
Email Design Studio /wp-admin/customize.php?sm-email-customize=1&templateid=1&themeid=120,35726.53842.22242.45
Email Design Studio /wp-admin/customize.php?sm-email-customize=1&emaillog=120,26332.91700.93205.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_sm_email_log
    • wp_sm_customiser_pro_table
  • The uninstall procedure has failed, leaving 565 options in the database
    • sm_customizer_maintext_581
    • sm_customizer_maintext_permanent_581
    • sm_customizer_maintext_permanent_862
    • sm_customizer_maintext_291
    • sm_customizer_maintext_permanent_722
    • sm_customizer_maintext_1512
    • sm_customizer_maintext_1231
    • sm_customizer_maintext_12101
    • sm_customizer_maintext_753
    • sm_customizer_maintext_13102
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 188 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?sm-email-customize=1&emaillog=1
    • > Notice in wp-content/plugins/email-design-studio/includes/class-smmail-emaillog.php+19
    Undefined index: HTTP_REFERER
  • 188 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?sm-email-customize=1&emaillog=1
    • > Notice in wp-content/plugins/email-design-studio/includes/class-smmail-emaillog.php+21
    Undefined index: query
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?sm-email-customize=1&emaillog=1
    • > Notice in wp-content/plugins/email-design-studio/includes/class-smmail-mailorders.php+24
    Undefined index: themeid

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?sm-email-customize=1&emaillog=1
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks,underscore,customize-base,wp-dom-ready&ver=5.8.1 1 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?sm-email-customize=1&emaillog=1
    • > Console-api (warning) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.6.0 1:31592 "jQuery.Deferred exception: _customizePartialRefreshExports is not defined" "ReferenceError: _customizePartialRefreshExports is not defined\n at Function.\u003Canonymous> (/wp-includes/js/customize-selective-refresh.min.js?ver=5.8.1:2:9029)\n at c (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:28327)\n at Object.fireWith (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:29072)\n at Function.trigger (/wp-includes/js/customize-base.min.js?ver=5.8.1:2:994)\n at HTMLDocument.\u003Canonymous> (/wp-includes/js/customize-preview.min.js?ver=5.8.1:2:10682)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30038)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.6.0:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?sm-email-customize=1&emaillog=1
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.6.0 1:31702 Uncaught ReferenceError: _customizePartialRefreshExports is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Email Template preview), #2 (Customizer Section), #3 (New User Registration), #4 (Reset Password), #5 (Blog Comment Admin Email), #6 (SMTP Configuration), #7 (Preview test mail), #8 (Mail body container)
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

email-design-studio/email-design-studio.php 92% from 13 tests

The main PHP script in "Email Design Studio" version 0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected39,673 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP441,9051,59924,568
SVG3009,552
CSS31,557824,417
JavaScript32581681,136

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity28.04
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity7.20
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods114
▷ Static methods1614.04%
▷ Public methods114100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
61 PNG files occupy 4.53MB with 1.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/theme143.png11.14KB11.14KB0.00%
assets/images/theme7.png9.46KB9.47KB0.00%
assets/images/logo7.png2.03KB1.14KB▼ 43.93%
assets/images/google-plus-black.png1.21KB0.45KB▼ 63.18%
assets/images/icon.png8.23KB3.55KB▼ 56.87%