84% aws-auto-ses

Code Review | AWS Automatic SES

WordPress plugin AWS Automatic SES scored84%from 54 tests.

About plugin

  • Plugin page: aws-auto-ses
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.6
  • WordPress version: 6.3.1
  • First release: Feb 17, 2016
  • Latest release: Dec 4, 2016
  • Number of updates: 7
  • Update frequency: every 41.9 days
  • Top authors: danielfriesen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /766 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.02ms] 75% from 4 tests

This is a short check of server-side resources used by AWS Automatic SES
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 3,138.03ms on /wp-admin/options-general.php?page=aws-auto-ses-options)
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.30 ▲5.88
Dashboard /wp-admin3.33 ▲0.0345.85 ▼6.59
Posts /wp-admin/edit.php3.38 ▲0.0348.81 ▼0.29
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.18 ▼2.60
Media Library /wp-admin/upload.php3.26 ▲0.0334.26 ▼2.61
SES Options /wp-admin/options-general.php?page=aws-auto-ses-options4.383,138.03

Server storage [IO: ▲4.58MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • You have illegally modified 1 file (14.92KB) outside of "wp-content/plugins/aws-auto-ses/" and "wp-content/uploads/"
    • (new file) wp-content/cache/aws-auto-ses/tplcache/3/1/317797846545e0ae0293000f67c3f4071f9ca5eebbc3df6b7690b2946ef80c97.php
Filesystem: 1,141 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

AWS Automatic SES: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.25 ▼1.042.02 ▼0.2341.79 ▼3.41
Dashboard /wp-admin2,201 ▲135.83 ▲0.94102.23 ▼11.1337.73 ▼7.04
Posts /wp-admin/edit.php2,090 ▲42.02 ▲0.0136.45 ▼1.0435.12 ▲2.61
Add New Post /wp-admin/post-new.php1,536 ▲223.16 ▲0.09583.91 ▼93.2248.57 ▼11.94
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0393.14 ▼5.8139.79 ▼2.30
SES Options /wp-admin/options-general.php?page=aws-auto-ses-options7362.0524.7424.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 437× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/lib/Twig/TokenParser/Set.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\HashInterface' not found in wp-content/plugins/aws-auto-ses/vendor/aws/aws-sdk-php/src/PhpHash.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/aws-auto-ses/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Unary' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/lib/Twig/Extension/Debug.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Unary' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_CompilerInterface' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/lib/Twig/Compiler.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/aws-auto-ses/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php:12

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: ses, email, mail, wp_mail, amazon...

aws-auto-ses/aws-auto-ses.php Passed 13 tests

The main PHP file in "AWS Automatic SES" ver. 0.0.1 adds more information about the plugin and also serves as the entry point for this plugin
94 characters long description:
Automatically configures WordPress to use SES when on an EC2 instance with a SES capable role.

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
Good job! No executable or dangerous file extensions detected49,026 lines of code in 870 files:
LanguageFilesBlank linesComment linesLines of code
PHP7066,99715,68536,009
JSON30805,776
reStructuredText892,2702,0233,144
Markdown1184702,974
C1161174792
HTML12100115
YAML525097
XML35054
make314031
C/C++ Header171315
Twig86014
m41215

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.30
Average class complexity6.37
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces128
Interfaces40
Traits4
Classes565
▷ Abstract classes193.36%
▷ Concrete classes54696.64%
▷ Final classes50.92%
Methods2,949
▷ Static methods1625.49%
▷ Public methods2,39481.18%
▷ Protected methods1695.73%
▷ Private methods38613.09%
Functions607
▷ Named functions13221.75%
▷ Anonymous functions47578.25%
Constants145
▷ Global constants10.69%
▷ Class constants14499.31%
▷ Public constants144100.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
There were not PNG files found in your plugin