73% smtp-amazon-ses

Code Review | SMTP for Amazon SES - YaySMTP

WordPress plugin SMTP for Amazon SES - YaySMTP scored73%from 54 tests.

About plugin

  • Plugin page: smtp-amazon-ses
  • Plugin version: 1.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: May 21, 2021
  • Latest release: Oct 24, 2023
  • Number of updates: 15
  • Update frequency: every 59.1 days
  • Top authors: yaycommerce (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active /9,326 total downloads

Benchmarks

Plugin footprint 65% 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.12MB] [CPU: ▼10.04ms] Passed 4 tests

Analyzing server-side resources used by SMTP for Amazon SES - YaySMTP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.78 ▼6.73
Dashboard /wp-admin3.45 ▲0.1042.37 ▼19.91
Posts /wp-admin/edit.php3.50 ▲0.1445.83 ▲7.47
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.39 ▼10.99
Media Library /wp-admin/upload.php3.37 ▲0.1433.62 ▼2.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SMTP for Amazon SES - YaySMTP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8614.38 ▲0.021.97 ▲0.1743.91 ▼2.86
Dashboard /wp-admin2,207 ▲305.63 ▼0.0192.94 ▲5.8243.65 ▲0.90
Posts /wp-admin/edit.php2,121 ▲212.00 ▼0.0138.77 ▼1.8138.52 ▲2.16
Add New Post /wp-admin/post-new.php1,541 ▲1522.99 ▲0.07651.68 ▲40.7955.61 ▲8.00
Media Library /wp-admin/upload.php1,421 ▲244.24 ▲0.0397.34 ▼8.9442.91 ▼1.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_yay_smtp_amazonses_email_logs
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • yay_smtp_amazonses_version
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 92× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'YaySMTPAmazonSES\\Aws3\\Aws\\Api\\Parser\\AbstractParser' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/Aws/Api/Parser/QueryParser.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'YaySMTPAmazonSES\\Aws3\\Aws\\Signature\\SignatureInterface' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/Aws/Signature/AnonymousSignature.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'YaySMTPAmazonSES\\Aws3\\Aws\\Api\\Parser\\AbstractRestParser' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/Aws/Api/Parser/RestJsonParser.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'YaySMTPAmazonSES\\Aws3\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/GuzzleHttp/Psr7/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'YaySMTPAmazonSES\\Aws3\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/GuzzleHttp/Promise/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'YaySMTPAmazonSES\\Aws3\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/GuzzleHttp/Promise/RejectedPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'YaySMTPAmazonSES\\Aws3\\Aws\\AwsClientInterface' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/Aws/AwsClient.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'YaySMTPAmazonSES\\Aws3\\Aws\\Api\\Serializer\\RestSerializer' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/Aws/Api/Serializer/RestXmlSerializer.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'YaySMTPAmazonSES\\Aws3\\GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/GuzzleHttp/Promise/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'YaySMTPAmazonSES\\Aws3\\Aws\\Api\\Parser\\AbstractParser' not found in wp-content/plugins/smtp-amazon-ses/vendor_amazon/Aws/Api/Parser/AbstractRestParser.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

smtp-amazon-ses/yay-smtp.php 85% from 13 tests

The main file in "SMTP for Amazon SES - YaySMTP" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("smtp-amazon-ses.php" instead of "yay-smtp.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin18,561 lines of code in 245 files:
LanguageFilesBlank linesComment linesLines of code
PHP2437289,14615,786
JavaScript1102791,529
CSS194311,246

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.38
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces29
Interfaces25
Traits10
Classes178
▷ Abstract classes84.49%
▷ Concrete classes17095.51%
▷ Final classes105.88%
Methods1,496
▷ Static methods20213.50%
▷ Public methods1,07371.72%
▷ Protected methods573.81%
▷ Private methods36624.47%
Functions272
▷ Named functions6825.00%
▷ Anonymous functions20475.00%
Constants127
▷ Global constants64.72%
▷ Class constants12195.28%
▷ Public constants121100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin