78% simple-ses-mail

Code Review | Simple AWS SES Mail

WordPress plugin Simple AWS SES Mail scored78%from 54 tests.

About plugin

  • Plugin page: simple-ses-mail
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 20, 2021
  • Latest release: Jan 20, 2021
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: s3bubble (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /556 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.37MB] [CPU: ▼1.40ms] Passed 4 tests

Server-side resources used by Simple AWS SES Mail
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3937.53 ▼5.25
Dashboard /wp-admin3.70 ▲0.3951.25 ▼0.85
Posts /wp-admin/edit.php3.75 ▲0.3953.00 ▼1.74
Add New Post /wp-admin/post-new.php6.24 ▲0.3596.56 ▲2.25
Media Library /wp-admin/upload.php3.56 ▲0.3339.92 ▲4.32
Logs /wp-admin/admin.php?page=sasm-email-logs3.5234.88
Connection /wp-admin/admin.php?page=sasm-email3.5232.74

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 1,658 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Simple AWS SES Mail
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.29 ▼0.061.61 ▼0.1940.87 ▼7.93
Dashboard /wp-admin2,228 ▲515.62 ▲0.0885.49 ▼4.2939.67 ▼3.68
Posts /wp-admin/edit.php2,130 ▲302.06 ▲0.1138.97 ▲1.6037.93 ▼0.91
Add New Post /wp-admin/post-new.php1,552 ▲2622.82 ▼0.82605.84 ▼50.6562.30 ▲6.93
Media Library /wp-admin/upload.php1,433 ▲304.21 ▲0.0495.77 ▼8.4543.82 ▲0.74
Logs /wp-admin/admin.php?page=sasm-email-logs8032.0424.8025.23
Connection /wp-admin/admin.php?page=sasm-email9902.0422.3636.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-ses-mail/vendor/mtdowling/jmespath.php/bin/jp.php
  • 738× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AbstractConfigurationProvider' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/EndpointDiscovery/ConfigurationProvider.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/HashingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/simple-ses-mail/vendor/guzzlehttp/psr7/src/AppendStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/Schemas/Exception/SchemasException.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-ses-mail/includes/class-sasm-admin.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/Honeycode/HoneycodeClient.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\ResultInterface' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/Result.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/Polly/PollyClient.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/Rekognition/RekognitionClient.php:103
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/simple-ses-mail/vendor/aws/aws-sdk-php/src/Efs/EfsClient.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Dashboard 1), #2 (Dashboard 2), #3 (Dashboard 3)
You can look at the official readme.txt

simple-ses-mail/simple-aws-ses-mail.php 85% from 13 tests

"Simple AWS SES Mail" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-ses-mail.php" instead of "simple-aws-ses-mail.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin45,961 lines of code in 1,643 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,6117,60635,23840,914
Markdown161,18703,620
JSON11601,227
JavaScript127060
reStructuredText1352959
CSS17057
XML10015
make1409

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.36
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces508
Interfaces50
Traits25
Classes846
▷ Abstract classes141.65%
▷ Concrete classes83298.35%
▷ Final classes242.88%
Methods2,544
▷ Static methods44517.49%
▷ Public methods1,78170.01%
▷ Protected methods1616.33%
▷ Private methods60223.66%
Functions481
▷ Named functions11924.74%
▷ Anonymous functions36275.26%
Constants218
▷ Global constants52.29%
▷ Class constants21397.71%
▷ Public constants213100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin