79% wp-mail-ses

Code Review | WP Mail SES

WordPress plugin WP Mail SES scored79%from 54 tests.

About plugin

  • Plugin page: wp-mail-ses
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2016
  • Latest release: Jan 3, 2018
  • Number of updates: 5
  • Update frequency: every 131.2 days
  • Top authors: bashaus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,334 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.18MB] [CPU: ▼6.62ms] Passed 4 tests

An overview of server-side resources used by WP Mail SES
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1735.35 ▼3.87
Dashboard /wp-admin3.55 ▲0.2045.35 ▼13.84
Posts /wp-admin/edit.php3.60 ▲0.2444.24 ▲0.55
Add New Post /wp-admin/post-new.php6.07 ▲0.1891.93 ▼9.07
Media Library /wp-admin/upload.php3.41 ▲0.1834.13 ▲0.30
WP Mail SES /wp-admin/options-general.php?page=wp-mail-ses/controllers/admin.php3.3830.62
SES Statistics /wp-admin/index.php?page=wp-mail-ses/controllers/stats.php3.3830.33

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
recovery_mode_email_last_sent
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mail SES
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.25 ▼0.481.62 ▼0.0341.45 ▲4.85
Dashboard /wp-admin2,218 ▲415.54 ▼0.0682.77 ▼6.2039.58 ▼1.27
Posts /wp-admin/edit.php2,127 ▲272.13 ▲0.0937.55 ▲1.6337.66 ▲0.99
Add New Post /wp-admin/post-new.php1,550 ▲1423.03 ▲4.49635.78 ▼1.1149.94 ▼33.34
Media Library /wp-admin/upload.php1,426 ▲264.24 ▲0.0798.01 ▼1.2345.07 ▼2.45
WP Mail SES /wp-admin/options-general.php?page=wp-mail-ses/controllers/admin.php8582.1823.3528.99
SES Statistics /wp-admin/index.php?page=wp-mail-ses/controllers/stats.php7121.516.3919.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/index.php?page=wp-mail-ses/controllers/stats.php
    • > Error in wp-content/plugins/wp-mail-ses/controllers/class-wp-mail-ses-statistics.php+29
    Uncaught Error: Call to a member function getSendQuota() on null in wp-content/plugins/wp-mail-ses/controllers/class-wp-mail-ses-statistics.php:29
    Stack trace:
    #0 wp-content/plugins/wp-mail-ses/controllers/class-wp-mail-ses-statistics.php(16): WP_Mail_SES_Statistics->index()
    #1 wp-content/plugins/wp-mail-ses/models/class-wp-mail-ses.php(149): WP_Mail_SES_Statistics->handle()
    #2 wp-includes/class-wp-hook.php(310): WP_Mail_SES->controller_statistics()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/index.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 50% 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
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-mail-ses/views/settings/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-mail-ses/views/statistics/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-mail-ses/models/class-wp-mail-ses.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: mail, ses, wp_mail

wp-mail-ses/wp-mail-ses.php Passed 13 tests

"WP Mail SES" version 0.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
55 characters long description:
Uses Amazon's Simple Email Service (SES) to send emails

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,213 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP102824461,175
Markdown14017
JSON10011
XML13010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity30.67
▷ Minimum class complexity6.00
▷ Maximum class complexity60.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes233.33%
Methods90
▷ Static methods33.33%
▷ Public methods8493.33%
▷ Protected methods22.22%
▷ Private methods44.44%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected