62% gnaritas-amazon-ses

Code Review | Gnaritas Amazon SES

WordPress plugin Gnaritas Amazon SES scored62%from 54 tests.

About plugin

  • Plugin page: gnaritas-amazon-ses
  • Plugin version: 0.1.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Nov 17, 2017
  • Latest release: Oct 22, 2019
  • Number of updates: 9
  • Update frequency: every 78.2 days
  • Top authors: dsantucci (66.67%)cwisdo (44.44%)

Code review

54 tests

User reviews

6 reviews

Install metrics

40+ active /1,918 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.13MB] [CPU: ▼42.05ms] Passed 4 tests

An overview of server-side resources used by Gnaritas Amazon SES
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.86 ▼3.28
Dashboard /wp-admin2.81 ▼0.4916.31 ▼41.32
Posts /wp-admin/edit.php2.81 ▼0.5517.94 ▼31.74
Add New Post /wp-admin/post-new.php2.81 ▼3.0816.81 ▼75.21
Media Library /wp-admin/upload.php2.81 ▼0.4215.10 ▼19.92
SNS Notifications /wp-admin/admin.php?page=gnses-notifications2.8115.98
Amazon SES /wp-admin/admin.php?page=gnses-main2.8117.41
Test Email /wp-admin/admin.php?page=gnses-test-email2.8113.84

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 917 new files
Database: 1 new table, 6 new options
New tables
gnses_notification
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Gnaritas Amazon SES
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲13613.33 ▼0.961.65 ▼0.1842.31 ▼3.05
Dashboard /wp-admin2,277 ▲895.88 ▲0.99110.52 ▼6.4642.52 ▼2.49
Posts /wp-admin/edit.php2,120 ▲311.99 ▼0.0340.11 ▲5.9335.96 ▲2.66
Add New Post /wp-admin/post-new.php1,538 ▲2417.41 ▼0.08628.66 ▼57.5750.47 ▼4.98
Media Library /wp-admin/upload.php1,419 ▲344.22 ▲0.0594.95 ▼12.0140.60 ▼3.48
SNS Notifications /wp-admin/admin.php?page=gnses-notifications1,1462.1829.6525.31
Amazon SES /wp-admin/admin.php?page=gnses-main1,0532.3425.2128.47
Test Email /wp-admin/admin.php?page=gnses-test-email8722.2225.6831.30

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
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/Ses.php+66
    Undefined index: gnses_action
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gnses-test-email
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/Ses.php+66
    Undefined index: gnses_action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/SesData.php+147
    Undefined index: date_start
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/SesData.php+147
    Undefined index: date_end
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/includes/admin-notifications.php+24
    Undefined index: notification_type
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/SesData.php+147
    Undefined index: filter_email
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/includes/admin-notifications.php+34
    Undefined index: bounce_type
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/NotificationListTable.php+61
    Undefined index: orderby
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/NotificationListTable.php+62
    Undefined index: order
    • > GET request to /wp-admin/admin.php?page=gnses-notifications
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/NotificationListTable.php+66
    Undefined index: paged
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gnses-test-email
    • > Notice in wp-content/plugins/gnaritas-amazon-ses/classes/Ses.php+489
    Undefined property: gnaritas\ses\Ses::$msg

SRP 0% 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 fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gnaritas-amazon-ses/includes/_admin_page_close.php
    • > /wp-content/plugins/gnaritas-amazon-ses/includes/_admin_form_close.php
  • 315× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-sdk-php/src/Glacier/GlacierClient.php:85
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-sdk-php/src/Sqs/Exception/SqsException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-php-sns-message-validator/tests/FunctionalValidationsTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-sdk-php/src/Mobile/MobileClient.php:27
    • > PHP Fatal error
      Trait 'Aws\\Api\\Parser\\PayloadParserTrait' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-sdk-php/src/Api/ErrorParser/JsonParserTrait.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-sdk-php/src/ConfigService/Exception/ConfigServiceException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-sdk-php/src/Batch/BatchClient.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/gnaritas-amazon-ses/vendor/aws/aws-sdk-php/src/ElasticsearchService/Exception/ElasticsearchServiceException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: smtp, mail, amazon, wp_mail, csv...

gnaritas-amazon-ses/gn-ses.php 92% from 13 tests

The primary PHP file in "Gnaritas Amazon SES" version 0.1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gnaritas-amazon-ses.php" instead of "gn-ses.php")

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
Good job! No executable or dangerous file extensions detected31,941 lines of code in 792 files:
LanguageFilesBlank linesComment linesLines of code
PHP7605,37419,98927,527
Markdown141,04403,524
JSON1060748
reStructuredText1352959
YAML39034
XML25027
make210022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.32
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces231
Interfaces24
Traits9
Classes426
▷ Abstract classes61.41%
▷ Concrete classes42098.59%
▷ Final classes102.38%
Methods2,011
▷ Static methods21410.64%
▷ Public methods1,44771.95%
▷ Protected methods924.57%
▷ Private methods47223.47%
Functions377
▷ Named functions8221.75%
▷ Anonymous functions29578.25%
Constants135
▷ Global constants00.00%
▷ Class constants135100.00%
▷ Public constants135100.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 images were found in this plugin