83% welcome-email-editor

Code Review | Welcome Email Editor

WordPress plugin Welcome Email Editor scored83%from 54 tests.

About plugin

  • Plugin page: welcome-email-editor
  • Plugin version: 5.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Apr 21, 2009
  • Latest release: Dec 1, 2023
  • Number of updates: 66
  • Update frequency: every 80.9 days
  • Top authors: seanbarton (80.3%)davidvongries (21.21%)

Code review

54 tests

User reviews

64 reviews

Install metrics

10,000+ active /269,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼5.98ms] Passed 4 tests

A check of server-side resources used by Welcome Email Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.52 ▼4.03
Dashboard /wp-admin3.62 ▲0.2750.11 ▼12.83
Posts /wp-admin/edit.php3.67 ▲0.3147.76 ▼3.81
Add New Post /wp-admin/post-new.php6.13 ▲0.2587.23 ▼3.23
Media Library /wp-admin/upload.php3.48 ▲0.2539.52 ▲6.94
Welcome Email Editor /wp-admin/options-general.php?page=weed_settings3.5532.41

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
weed_v5_compatibility
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Welcome Email Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲5814.69 ▼0.041.80 ▼0.0440.93 ▼11.27
Dashboard /wp-admin2,199 ▲245.62 ▼0.0790.85 ▼21.7039.49 ▼7.12
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0637.72 ▼4.2836.14 ▼2.36
Add New Post /wp-admin/post-new.php1,529 ▲323.07 ▼0.36680.03 ▼26.4852.68 ▼14.15
Media Library /wp-admin/upload.php1,407 ▲104.28 ▲0.0594.78 ▼2.6541.30 ▼0.46
Welcome Email Editor /wp-admin/options-general.php?page=weed_settings1,2922.0126.2048.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • weed_v5_compatibility
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 31× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/welcome-email-editor/modules/settings/templates/fields/reset-password-email/subject.php
    • > /wp-content/plugins/welcome-email-editor/modules/settings/templates/fields/admin-new-user-notif-email/subject.php
    • > /wp-content/plugins/welcome-email-editor/modules/settings/templates/fields/user-welcome-email/additional-headers.php
    • > /wp-content/plugins/welcome-email-editor/modules/settings/templates/fields/admin-new-user-notif-email/body.php
    • > /wp-content/plugins/welcome-email-editor/modules/settings/templates/fields/misc/remove-on-uninstall.php
    • > /wp-content/plugins/welcome-email-editor/modules/settings/templates/fields/user-welcome-email/reply-to-name.php
    • > /wp-content/plugins/welcome-email-editor/helpers/class-content-helper.php
    • > /wp-content/plugins/welcome-email-editor/modules/settings/ajax/class-test-emails.php
    • > /wp-content/plugins/welcome-email-editor/modules/settings/templates/fields/user-welcome-email/body.php
    • > /wp-content/plugins/welcome-email-editor/modules/base/class-base-output.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Welcome Email Editor Settings Page)
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

welcome-email-editor/sb_welcome_email_editor.php 92% from 13 tests

The primary PHP file in "Welcome Email Editor" version 5.0.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("welcome-email-editor.php" instead of "sb_welcome_email_editor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,824 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP326267771,350
CSS29630424
JavaScript1141550

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.64
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods72
▷ Static methods1013.89%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions15.00%
▷ Anonymous functions1995.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/welcome-email-editor-logo.png15.07KB5.37KB▼ 64.35%