68% fluent-smtp

Code Review | FluentSMTP - WP Mail SMTP, Amazon SES, SendGrid, MailGun and Any SMTP Connector Plugin

WordPress plugin FluentSMTP - WP Mail SMTP, Amazon SES, SendGrid, MailGun and Any SMTP Connector Plugin scored68%from 54 tests.

About plugin

  • Plugin page: fluent-smtp
  • Plugin version: 2.2.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Jan 18, 2021
  • Latest release: Oct 1, 2023
  • Number of updates: 28
  • Update frequency: every 35.3 days
  • Top authors: techjewel (100%)

Code review

54 tests

User reviews

173 reviews

Install metrics

100,000+ active /1,063,774 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.73MB] [CPU: ▼3.09ms] Passed 4 tests

Analyzing server-side resources used by FluentSMTP - WP Mail SMTP, Amazon SES, SendGrid, MailGun and Any SMTP Connector Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7047.30 ▲2.98
Dashboard /wp-admin4.17 ▲0.8356.65 ▼9.46
Posts /wp-admin/edit.php4.10 ▲0.7554.37 ▲4.33
Add New Post /wp-admin/post-new.php6.64 ▲0.7591.38 ▼10.22
Media Library /wp-admin/upload.php3.97 ▲0.7549.06 ▲11.23
Fluent SMTP /wp-admin/options-general.php?page=fluent-mail4.0843.08

Server storage [IO: ▲7.20MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 573 new files
Database: 1 new table, 6 new options
New tables
wp_fsmpt_email_logs
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for FluentSMTP - WP Mail SMTP, Amazon SES, SendGrid, MailGun and Any SMTP Connector Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18413.28 ▼0.991.88 ▼0.0442.04 ▲0.36
Dashboard /wp-admin2,330 ▲1394.86 ▼0.99102.05 ▼16.1139.05 ▼2.77
Posts /wp-admin/edit.php2,114 ▲101.98 ▼0.0735.96 ▼1.7933.39 ▼1.30
Add New Post /wp-admin/post-new.php1,560 ▲2923.16 ▲0.12637.31 ▲8.7762.23 ▲4.12
Media Library /wp-admin/upload.php1,416 ▲164.09 ▼0.09111.90 ▼5.3649.24 ▲3.71
Fluent SMTP /wp-admin/options-general.php?page=fluent-mail1,1626.92241.9764.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_fsmpt_email_logs
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/fluent-smtp/app/views/admin/email_text.php
    • > /wp-content/plugins/fluent-smtp/app/views/admin/menu.php
    • > /wp-content/plugins/fluent-smtp/app/views/admin/digest_email.php
  • 289× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FluentSmtpLib\\PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'FluentSmtpLib\\Google\\Auth\\CredentialsLoader' not found in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/google/auth/src/Credentials/UserRefreshCredentials.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'FluentSmtpLib\\Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php:23
    • > PHP Notice
      Undefined variable: connection in wp-content/plugins/fluent-smtp/app/views/admin/ses_connection_info.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'FluentSmtpLib\\Google\\AuthHandler\\Guzzle6AuthHandler' not found in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php:23
    • > PHP Fatal error
      Trait 'FluentMail\\App\\Services\\Mailer\\ValidatorTrait' not found in wp-content/plugins/fluent-smtp/app/Services/Mailer/Providers/AmazonSes/ValidatorTrait.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'FluentSmtpLib\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php:25
    • > PHP Parse error
      syntax error, unexpected '|', expecting '{' in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/symfony/polyfill-intl-idn/bootstrap80.php on line 120
    • > PHP Fatal error
      Uncaught Error: Interface 'FluentSmtpLib\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/guzzlehttp/psr7/src/LimitStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FluentSmtpLib\\Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/fluent-smtp/includes/libs/google-api-client/build/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php:19

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

fluent-smtp/fluent-smtp.php Passed 13 tests

The main PHP script in "FluentSMTP - WP Mail SMTP, Amazon SES, SendGrid, MailGun and Any SMTP Connector Plugin" version 2.2.6 is automatically included on every request by WordPress
50 characters long description:
The Ultimate SMTP Connection Plugin for WordPress.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected91,909 lines of code in 536 files:
LanguageFilesBlank linesComment linesLines of code
PHP50129,29244,14478,526
JavaScript102,5552,52111,342
JSON6001,302
PO File1201225551
XML10077
CSS14032
Bourne Shell13431
YAML12025
SVG130013
Dockerfile18010

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.69
▷ Minimum class complexity1.00
▷ Maximum class complexity634.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces82
Interfaces40
Traits24
Classes406
▷ Abstract classes112.71%
▷ Concrete classes39597.29%
▷ Final classes287.09%
Methods3,631
▷ Static methods3178.73%
▷ Public methods2,95581.38%
▷ Protected methods3599.89%
▷ Private methods3178.73%
Functions270
▷ Named functions9334.44%
▷ Anonymous functions17765.56%
Constants538
▷ Global constants11421.19%
▷ Class constants42478.81%
▷ Public constants424100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fluentsmtp.png13.44KB7.81KB▼ 41.88%
assets/images/contributors.png82.09KB25.04KB▼ 69.50%
assets/images/fluentsmtp-white.png31.66KB13.77KB▼ 56.50%
assets/images/mail_signature.png6.78KB5.27KB▼ 22.31%