77% mail-baby-smtp

Code Review | Mail Baby SMTP

WordPress plugin Mail Baby SMTP scored77%from 54 tests.

About plugin

  • Plugin page: mail-baby-smtp
  • Plugin version: 2.6
  • PHP compatiblity: 7.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 10, 2021
  • Latest release: Nov 13, 2023
  • Number of updates: 31
  • Update frequency: every 27.9 days
  • Top authors: InterServer.Net Web Hosting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /1,745 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Mail Baby SMTP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.76 ▼6.21
Dashboard /wp-admin3.31 ▲0.0063.94 ▲13.05
Posts /wp-admin/edit.php3.36 ▲0.0051.26 ▲7.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.96 ▼9.79
Media Library /wp-admin/upload.php3.23 ▲0.0034.13 ▼0.20

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Mail Baby SMTP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▼0.072.01 ▲0.1142.26 ▼0.51
Dashboard /wp-admin2,195 ▲155.57 ▼0.0893.06 ▼10.0843.87 ▼1.96
Posts /wp-admin/edit.php2,097 ▼02.02 ▲0.0736.57 ▼0.5231.38 ▼1.90
Add New Post /wp-admin/post-new.php1,535 ▲518.31 ▼4.78596.95 ▼92.7564.24 ▲7.80
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.0595.87 ▼9.5840.69 ▼4.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 fix the following
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mail-baby-smtp/inc/vendor/sendgrid/php-http-client/lib/SendGrid/Client.php
    • > /wp-content/plugins/mail-baby-smtp/inc/assets/css/customstyle.php
    • > /wp-content/plugins/mail-baby-smtp/inc/templates/Mailgun/wp-mail-smtp.php
    • > /wp-content/plugins/mail-baby-smtp/inc/templates/Sendin_blue/mailin.php
    • > /wp-content/plugins/mail-baby-smtp/inc/vendor/sendgrid/sendgrid/scripts/generate_upload_policy.php
    • > /wp-content/plugins/mail-baby-smtp/inc/templates/Sendin_blue/sendinblue.php
  • 333× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/guzzlehttp/psr7/src/Uri.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailPlus\\Logs' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Sendgrid/views/Logs.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/google/auth/tests/BaseTest.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/guzzlehttp/promises/src/EachPromise.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\CredentialsLoader' not found in wp-content/plugins/mail-baby-smtp/inc/templates/Gmail/google-api-php-client/vendor/google/auth/src/Credentials/AppIdentityCredentials.php:103

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

mail-baby-smtp/mail-baby-smtp.php 92% from 13 tests

This is the main PHP file of "Mail Baby SMTP" version 2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 436 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin132,490 lines of code in 601 files:
LanguageFilesBlank linesComment linesLines of code
PHP44717,41529,16862,091
CSS284,10617342,637
JavaScript224,2341,91314,307
Markdown343,05908,445
JSON17101,201
Sass1319221,158
LESS1319311,149
SVG1200743
HTML640555
YAML36091
Bourne Shell213363
XML33041
make1409

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.39
▷ Minimum class complexity1.00
▷ Maximum class complexity592.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces42
Interfaces26
Traits5
Classes416
▷ Abstract classes102.40%
▷ Concrete classes40697.60%
▷ Final classes92.22%
Methods3,584
▷ Static methods2125.92%
▷ Public methods3,10086.50%
▷ Protected methods2266.31%
▷ Private methods2587.20%
Functions286
▷ Named functions10938.11%
▷ Anonymous functions17761.89%
Constants375
▷ Global constants4211.20%
▷ Class constants33388.80%
▷ Public constants333100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/assets/img/mailbaby.png9.33KB4.64KB▼ 50.24%
inc/images/not-connected.png2.87KB1.89KB▼ 34.10%
inc/assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
inc/assets/css/chosen-sprite.png0.53KB0.88KB0.00%
inc/images/connected.png2.81KB1.86KB▼ 33.91%