10% aws-ses-for-wp

Code Review | SES for Wordpress

WordPress plugin SES for Wordpress scored10%from 54 tests.

About plugin

  • Plugin page: aws-ses-for-wp
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Jan 9, 2013
  • Latest release: Jan 9, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: duncanjbrown (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,046 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/aws-ses-for-wp/lib/Mail/mime.php+95
    Methods with the same name as their class will not be constructors in a future version of PHP; Mail_mime has a deprecated constructor

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.54ms] Passed 4 tests

This is a short check of server-side resources used by SES for Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.47 ▼7.06
Dashboard /wp-admin3.31 ▲0.0044.84 ▼5.99
Posts /wp-admin/edit.php3.36 ▲0.0047.22 ▼0.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.90 ▼3.44
Media Library /wp-admin/upload.php3.23 ▲0.0031.20 ▼1.66

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 297 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for SES for Wordpress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.383.93 ▲1.9543.87 ▼7.13
Dashboard /wp-admin2,206 ▲185.88 ▲0.0297.51 ▼20.1538.78 ▼8.28
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0439.92 ▲5.4536.20 ▲2.99
Add New Post /wp-admin/post-new.php1,528 ▼1418.43 ▲0.20604.00 ▼25.9255.52 ▲6.19
Media Library /wp-admin/upload.php1,391 ▲64.21 ▲0.0195.23 ▼2.8940.80 ▼1.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/aws-ses-for-wp/lib/sdk/_compatibility_test/sdk_compatibility_test.php
    • > /wp-content/plugins/aws-ses-for-wp/lib/sdk/config-sample.inc.php
    • > /wp-content/plugins/aws-ses-for-wp/lib/sdk/_compatibility_test/sdk_compatibility_test_cli.php
  • 69× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > Failed to determine HOME directory after trying "sh
      1: cd: can't cd to ~" (exit code 2)
    • > PHP Fatal error
      Uncaught CFCredentials_Exception: No credentials were provided. The SDK attempts to retrieve Instance Profile credentials from the EC2 Instance Metadata Service, but doing this requires the "default_cache_config" option to be set in the config.inc.php file or constructor. In order to cache the retrieved credentials. in wp-content/plugins/aws-ses-for-wp/lib/sdk/sdk.class.php:439
    • > PHP Fatal error
      Uncaught Error: Class 'CFRuntime' not found in wp-content/plugins/aws-ses-for-wp/lib/sdk/services/s3.class.php:58
    • > PHP Fatal error
      Uncaught Error: Class 'CacheCore' not found in wp-content/plugins/aws-ses-for-wp/lib/sdk/lib/cachecore/cachepdo.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CFRuntime' not found in wp-content/plugins/aws-ses-for-wp/lib/sdk/services/rds.class.php:45
    • > Failed to determine HOME directory after trying "sh
      1: cd: can't cd to ~" (exit code 2)
    • > PHP Fatal error
      Uncaught Error: Class 'CacheCore' not found in wp-content/plugins/aws-ses-for-wp/lib/sdk/lib/cachecore/cacheapc.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Signer' not found in wp-content/plugins/aws-ses-for-wp/lib/sdk/authentication/signature_v3query.class.php:29
    • > PHP Fatal error
      Uncaught CFCredentials_Exception: No credentials were provided. The SDK attempts to retrieve Instance Profile credentials from the EC2 Instance Metadata Service, but doing this requires the "default_cache_config" option to be set in the config.inc.php file or constructor. In order to cache the retrieved credentials. in wp-content/plugins/aws-ses-for-wp/lib/sdk/sdk.class.php:439
    • > PHP Fatal error
      Uncaught Error: Class 'AmazonS3' not found in wp-content/plugins/aws-ses-for-wp/lib/sdk/extensions/s3browserupload.class.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The options page) image missing
You can look at the official readme.txt

aws-ses-for-wp/ses-for-wordpress.php 85% from 13 tests

The main PHP file in "SES for Wordpress" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aws-ses-for-wp.php" instead of "ses-for-wordpress.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
No dangerous file extensions were detected23,705 lines of code in 277 files:
LanguageFilesBlank linesComment linesLines of code
PHP2565,66921,75721,217
Markdown1380101,956
HTML2470431
YAML11040
JSON10027
CSS14019
SQL30015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.35
▷ Minimum class complexity1.00
▷ Maximum class complexity451.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes123
▷ Abstract classes32.44%
▷ Concrete classes12097.56%
▷ Final classes00.00%
Methods1,170
▷ Static methods756.41%
▷ Public methods1,10194.10%
▷ Protected methods605.13%
▷ Private methods90.77%
Functions31
▷ Named functions2787.10%
▷ Anonymous functions412.90%
Constants425
▷ Global constants214.94%
▷ Class constants40495.06%
▷ Public constants404100.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
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png74.93KB32.81KB▼ 56.21%