71% email-shortcode

Code Review | Event Espresso - Custom Email Template Shortcode

WordPress plugin Event Espresso - Custom Email Template Shortcode scored71%from 54 tests.

About plugin

  • Plugin page: email-shortcode
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2017
  • Latest release: Oct 4, 2023
  • Number of updates: 12
  • Update frequency: every 188.3 days
  • Top authors: kadiwala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.30ms] Passed 4 tests

This is a short check of server-side resources used by Event Espresso - Custom Email Template Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.22 ▼2.24
Dashboard /wp-admin3.33 ▲0.0248.43 ▼8.57
Posts /wp-admin/edit.php3.38 ▲0.0251.36 ▲0.16
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.58 ▼6.53
Media Library /wp-admin/upload.php3.25 ▲0.0238.15 ▲2.68
About /wp-admin/admin.php?page=ee_email_shortcode_about3.2535.62
Add New E-Shortcode /wp-admin/admin.php?page=ee_email_shortcode_add_new3.3336.30
Custom E-Shortcodes /wp-admin/admin.php?page=ee_email_shortcode3.4140.05

Server storage [IO: ▲0.33MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 30 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

A check of browser resources used by Event Espresso - Custom Email Template Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.66 ▼0.745.28 ▲3.6339.03 ▼6.41
Dashboard /wp-admin2,250 ▲624.87 ▲0.00111.14 ▼4.9443.24 ▼2.04
Posts /wp-admin/edit.php2,130 ▲412.05 ▲0.0640.89 ▲6.0035.27 ▲0.44
Add New Post /wp-admin/post-new.php1,549 ▲3523.10 ▲5.67676.19 ▲6.3573.89 ▲20.98
Media Library /wp-admin/upload.php1,432 ▲414.23 ▼0.0299.71 ▲2.5444.12 ▼0.42
About /wp-admin/admin.php?page=ee_email_shortcode_about1,0152.0927.4140.95
Add New E-Shortcode /wp-admin/admin.php?page=ee_email_shortcode_add_new9841.7424.5029.84
Custom E-Shortcodes /wp-admin/admin.php?page=ee_email_shortcode1,0811.6830.1126.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=ee_email_shortcode
    • > Warning in wp-content/plugins/email-shortcode/admin/partials/custom_e-shortcodes.php+428
    count(): Parameter must be an array or an object that implements Countable

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 fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/email-shortcode/admin/partials/ee-email-shortcode-admin-display.php
    • > /wp-content/plugins/email-shortcode/public/partials/ee-email-shortcode-public-display.php

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=ee_email_shortcode_about
    • > Network (severe)
    wp-content/plugins/ee-email-shortcode/admin/img/add_new_e_shortcode.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=ee_email_shortcode_about
    • > Network (severe)
    wp-content/plugins/ee-email-shortcode/admin/img/e_shortcodes.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=ee_email_shortcode_about
    • > Network (severe)
    wp-content/plugins/ee-email-shortcode/admin/img/update_e_shortcode.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=ee_email_shortcode_about
    • > Network (severe)
    wp-content/plugins/ee-email-shortcode/admin/img/help_1.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=ee_email_shortcode_about
    • > Network (severe)
    wp-content/plugins/ee-email-shortcode/admin/img/help_2.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: "www.elsner.com"
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === email-shortcode === )
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in email-shortcode/assets to your readme.txt
Please take inspiration from this readme.txt

email-shortcode/ee-email-shortcode.php 85% from 13 tests

The principal PHP file in "Event Espresso - Custom Email Template Shortcode" v. 1.0.0 is loaded by WordPress automatically on each request
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 ("email-shortcode.php" instead of "ee-email-shortcode.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin1,280 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP152936191,184
CSS2111352
JavaScript285444

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.24MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/add_new_e_shortcode.png29.25KB8.93KB▼ 69.49%
admin/img/e_shortcodes.png56.98KB17.57KB▼ 69.17%
admin/img/help_1.png60.46KB20.05KB▼ 66.84%
admin/img/update_e_shortcode.png29.29KB9.05KB▼ 69.11%
admin/img/help_2.png68.83KB20.61KB▼ 70.05%