79% smtp-sendgrid

Code Review | SMTP for SendGrid - YaySMTP

WordPress plugin SMTP for SendGrid - YaySMTP scored79%from 54 tests.

About plugin

  • Plugin page: smtp-sendgrid
  • Plugin version: 1.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 5, 2021
  • Latest release: Apr 5, 2023
  • Number of updates: 11
  • Update frequency: every 66.4 days
  • Top authors: yaycommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,521 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
Installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼1.73ms] Passed 4 tests

An overview of server-side resources used by SMTP for SendGrid - YaySMTP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2946.20 ▲8.18
Dashboard /wp-admin3.59 ▲0.2849.54 ▼4.83
Posts /wp-admin/edit.php3.64 ▲0.2855.38 ▲0.43
Add New Post /wp-admin/post-new.php6.17 ▲0.2889.24 ▼3.39
Media Library /wp-admin/upload.php3.51 ▲0.2839.19 ▲0.89

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_yay_smtp_sendgrid_email_logs
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
yay_smtp_sendgrid_version

Browser metrics Passed 4 tests

A check of browser resources used by SMTP for SendGrid - YaySMTP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.47 ▲0.181.84 ▼0.3342.63 ▼10.37
Dashboard /wp-admin2,224 ▲365.86 ▲0.8499.57 ▼6.6741.17 ▼0.77
Posts /wp-admin/edit.php2,110 ▲212.03 ▲0.0341.12 ▲3.2436.04 ▲0.53
Add New Post /wp-admin/post-new.php1,529 ▼417.58 ▼5.74642.71 ▼71.7955.03 ▲4.95
Media Library /wp-admin/upload.php1,409 ▲244.23 ▼0.0296.78 ▼12.6044.99 ▼5.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_yay_smtp_sendgrid_email_logs
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • yay_smtp_sendgrid_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 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: sendgrid smtp, sendgrid, wp mail, wp smtp, wordpress smtp...

smtp-sendgrid/yay-smtp.php 85% from 13 tests

Analyzing the main PHP file in "SMTP for SendGrid - YaySMTP" version 1.3
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("smtp-sendgrid.php" instead of "yay-smtp.php")

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 detected4,673 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP20272331,902
JavaScript1103801,525
CSS194311,246

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity24.50
▷ Minimum class complexity3.00
▷ Maximum class complexity76.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods79
▷ Static methods3949.37%
▷ Public methods6683.54%
▷ Protected methods11.27%
▷ Private methods1215.19%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected