94% wp-sendgrid-smtp

Code Review | WP SendGrid SMTP

WordPress plugin WP SendGrid SMTP scored 94% from 54 tests.

About plugin

  • Plugin page: wp-sendgrid-smtp
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 5.8.1
  • First release: Oct 7, 2016
  • Latest release: Aug 21, 2018
  • Number of updates: 33
  • Update frequency: every 20.7 days
  • Top authors: inkthemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

4,000+ active / 44,337 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼145.86ms] Passed 4 tests

Analyzing server-side resources used by WP SendGrid SMTP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2032.40 ▲10.12
Dashboard /wp-admin3.16 ▲0.1138.92 ▼9.68
Posts /wp-admin/edit.php3.27 ▲0.1738.74 ▼7.52
Add New Post /wp-admin/post-new.php5.52 ▲0.0991.00 ▼568.10
Media Library /wp-admin/upload.php3.10 ▲0.1036.15 ▲1.88

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WP SendGrid SMTP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,738 ▲14215.84 ▲0.1510.18 ▼2.1243.73 ▲3.22
Dashboard /wp-admin3,005 ▲745.90 ▼0.11149.07 ▲0.05106.28 ▼0.16
Posts /wp-admin/edit.php2,776 ▲372.85 ▲0.1272.69 ▼15.9093.95 ▼0.07
Add New Post /wp-admin/post-new.php1,627 ▼5618.47 ▼0.23380.07 ▼22.99113.45 ▲0.24
Media Library /wp-admin/upload.php1,845 ▲385.02 ▼0.02153.64 ▼16.55111.82 ▼10.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-sendgrid-smtp/wp-sendgrid-smtp.php:38

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-sendgrid-smtp/wp-sendgrid-smtp.php Passed 13 tests

This is the main PHP file of "WP SendGrid SMTP" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
106 characters long description:
WP SendGrid SMTP allows you to send all outgoing emails via SendGrid SMTP server from your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected545 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP59890545

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.75
▷ Minimum class complexity4.00
▷ Maximum class complexity25.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png84.60KB37.29KB▼ 55.93%
screenshot-2.png60.30KB26.87KB▼ 55.45%
m_bolt_img.png22.17KB8.42KB▼ 62.01%