83% wp-mail-smtp-sendgrid-edition

Code Review | WP Mail SMTP SendGrid Edition

WordPress plugin WP Mail SMTP SendGrid Edition scored 83% from 54 tests.

About plugin

  • Plugin page: wp-mail-smtp-send...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.3
  • WordPress version: 6.3.1
  • First release: Jul 4, 2017
  • Latest release: Aug 22, 2023
  • Number of updates: 10
  • Update frequency: every 224.1 days
  • Top authors: FolioVision (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,171 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.04ms] Passed 4 tests

An overview of server-side resources used by WP Mail SMTP SendGrid Edition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.15 ▼1.48
Dashboard /wp-admin3.32 ▲0.0247.51 ▼1.21
Posts /wp-admin/edit.php3.37 ▲0.0247.30 ▲3.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.63 ▼3.50
Media Library /wp-admin/upload.php3.24 ▲0.0232.86 ▲2.02
Email /wp-admin/options-general.php?page=wp-mail-smtp-sendgrid-edition/wp_mail_smtp.php3.2429.31

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 16 new options
New WordPress options
can_compress_scripts
smtp_pass
mailer
smtp_host
widget_recent-posts
smtp_auth
widget_theysaidso_widget
db_upgraded
smtp_port
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mail SMTP SendGrid Edition
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.18 ▼1.172.01 ▼0.2546.72 ▼0.98
Dashboard /wp-admin2,207 ▲195.76 ▼0.2199.59 ▼18.7239.25 ▼2.12
Posts /wp-admin/edit.php2,093 ▲72.04 ▲0.0335.80 ▼0.8630.62 ▼1.67
Add New Post /wp-admin/post-new.php1,537 ▲423.04 ▼0.11652.50 ▼21.0250.66 ▲0.55
Media Library /wp-admin/upload.php1,392 ▲44.12 ▼0.1093.41 ▼11.8542.85 ▲1.22
Email /wp-admin/options-general.php?page=wp-mail-smtp-sendgrid-edition/wp_mail_smtp.php1,0631.8323.5833.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 16 options
    • smtp_user
    • widget_recent-comments
    • can_compress_scripts
    • mailer
    • mail_from_name
    • smtp_auth
    • smtp_port
    • smtp_host
    • smtp_ssl
    • mail_set_return_path
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-mail-smtp-sendgrid-edition/wp_mail_smtp.php:551

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Advanced Email Options), #2 (SMTP Options), #3 (Send a Test Email), #4 (Subject in the SendGrid Activity screen)
The official readme.txt is a good inspiration

wp-mail-smtp-sendgrid-edition/wp_mail_smtp.php 85% from 13 tests

The principal PHP file in "WP Mail SMTP SendGrid Edition" v. 1.4.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 171 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-mail-smtp-sendgrid-edition.php" instead of "wp_mail_smtp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected356 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112115346
Markdown18010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.36MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png76.66KB25.21KB▼ 67.11%
screenshot-2.png124.71KB37.91KB▼ 69.60%
screenshot-3.png29.05KB8.73KB▼ 69.96%
screenshot-1.png139.75KB42.60KB▼ 69.52%