72% elastic-email-sender

Code Review | Elastic Email Sender

WordPress plugin Elastic Email Sender scored 72% from 54 tests.

About plugin

  • Plugin page: elastic-email-sender
  • Plugin version: 1.2.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.3
  • WordPress version: 5.8.1
  • First release: Jun 16, 2017
  • Latest release: Jan 11, 2022
  • Number of updates: 94
  • Update frequency: every 17.8 days
  • Top authors: elasticemail (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

8,000+ active / 85,280 total downloads

Benchmarks

Plugin footprint 83% 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.15MB] [CPU: ▼150.41ms] Passed 4 tests

This is a short check of server-side resources used by Elastic Email Sender
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0627.54 ▲1.00
Dashboard /wp-admin3.24 ▲0.1838.25 ▼10.22
Posts /wp-admin/edit.php3.35 ▲0.2436.21 ▲3.99
Add New Post /wp-admin/post-new.php5.61 ▲0.1773.55 ▼594.67
Media Library /wp-admin/upload.php3.18 ▲0.1827.97 ▲2.26
Error log /wp-admin/admin.php?page=elasticemail-error-log3.1525.44
Settings /wp-admin/admin.php?page=elasticemail-settings4.1443.17
Reports /wp-admin/admin.php?page=elasticemail-report4.1425.79
Send test /wp-admin/admin.php?page=elasticemail-send-test3.1722.36

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 25 new files
Database: 1 new table, 10 new options
New tables
wp_elasticemail_log
New WordPress options
elastic-email-sender-basename
ees-connecting-status
ee_mimetype
ee_is_created_channels
ees_plugin_dir_name
ee_send-email-type
ee-apikey
ee_config_from_email
ee_config_from_name
daterangeselect

Browser metrics Passed 4 tests

A check of browser resources used by Elastic Email Sender
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲10715.90 ▲0.205.49 ▼0.8575.16 ▼2.54
Dashboard /wp-admin2,973 ▲776.13 ▼0.02117.64 ▼17.79201.07 ▲27.05
Posts /wp-admin/edit.php2,788 ▲483.12 ▼0.1161.64 ▼0.29137.13 ▲4.51
Add New Post /wp-admin/post-new.php3,769 ▼3818.76 ▲0.33446.31 ▼1.87195.86 ▲29.76
Media Library /wp-admin/upload.php1,794 ▲425.49 ▼0.00126.11 ▼7.69196.39 ▲9.45
Error log /wp-admin/admin.php?page=elasticemail-error-log1,4383.0555.85100.77
Settings /wp-admin/admin.php?page=elasticemail-settings1,5322.3753.83109.96
Reports /wp-admin/admin.php?page=elasticemail-report1,3793.3462.5486.31
Send test /wp-admin/admin.php?page=elasticemail-send-test1,3982.9953.8297.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • ee-apikey

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=elasticemail-send-test
    • > Notice in wp-content/plugins/elastic-email-sender/template/t-ees_sendtest.php+23
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/elastic-email-sender/template/t-ees_admin.php
    • > /wp-content/plugins/elastic-email-sender/template/t-ees_sendtest.php
    • > /wp-content/plugins/elastic-email-sender/template/t-ees_errorlog.php
    • > /wp-content/plugins/elastic-email-sender/template/t-ees_reports.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/elastic-email-sender/elasticemailsender.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/elastic-email-sender/defaults/function.reset_pass.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/elastic-email-sender/defaults/function.wp_mail.php:12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/elastic-email-sender/elasticemailsender.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/elastic-email-sender/template/t-ees_apidisabled.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/elastic-email-sender/template/t-ees_connecterror.php:2
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/elastic-email-sender/elasticemailsender.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/elastic-email-sender/template/t-ees_marketing.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/elastic-email-sender/elasticemailsender.php:7

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: email sender, elastic email, email, transactional email, mailer...

elastic-email-sender/elasticemailsender.php 85% from 13 tests

Analyzing the main PHP file in "Elastic Email Sender" version 1.2.4
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 192 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("elastic-email-sender.php" instead of "elasticemailsender.php")

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
No dangerous file extensions were detected5,203 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP131,2573,5004,236
SVG300962
JavaScript30103
CSS2062

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity2.86
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes92
▷ Abstract classes1920.65%
▷ Concrete classes7379.35%
▷ Final classes00.00%
Methods174
▷ Static methods137.47%
▷ Public methods17298.85%
▷ Protected methods00.00%
▷ Private methods21.15%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants104
▷ Global constants10.96%
▷ Class constants10399.04%
▷ Public constants103100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/img/connect_apikey.png16.15KB6.44KB▼ 60.15%
src/img/icon.png3.45KB0.78KB▼ 77.30%