94% mailster-sendgrid

Code Review | Mailster SendGrid Integration

WordPress plugin Mailster SendGrid Integration scored 94% from 54 tests.

About plugin

  • Plugin page: mailster-sendgrid
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 5.9.2
  • First release: Jan 13, 2017
  • Latest release: Feb 3, 2022
  • Number of updates: 34
  • Update frequency: every 54.3 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 18,930 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼292.13ms] Passed 4 tests

This is a short check of server-side resources used by Mailster SendGrid Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1479.75 ▲28.05
Dashboard /wp-admin3.50 ▲0.0935.62 ▲2.98
Posts /wp-admin/edit.php3.73 ▲0.0939.10 ▲1.76
Add New Post /wp-admin/post-new.php6.97 ▼0.0099.13 ▼1,173.74
Media Library /wp-admin/upload.php3.38 ▲0.0924.13 ▲0.47

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mailster SendGrid Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲3415.94 ▲0.035.85 ▼0.102.45 ▲0.26
Dashboard /wp-admin2,920 ▲626.15 ▼0.01120.12 ▼17.90162.19 ▼0.63
Posts /wp-admin/edit.php2,716 ▲253.24 ▲0.0162.43 ▼3.07139.01 ▼4.12
Add New Post /wp-admin/post-new.php1,676 ▲1516.61 ▼0.20402.10 ▼20.12161.97 ▲9.81
Media Library /wp-admin/upload.php1,723 ▲255.50 ▼0.02135.51 ▲0.23182.23 ▼0.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mailster-sendgrid/views/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mailster-sendgrid/classes/sendgrid.class.php:10
    • > PHP Notice
      Undefined variable: verified in wp-content/plugins/mailster-sendgrid/views/settings.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: email, delivery, mailster, mailsteresp, newsletter

mailster-sendgrid/mailster-sendgrid.php Passed 13 tests

The entry point to "Mailster SendGrid Integration" version 2.1 is a PHP file that has certain tags in its header comment area
81 characters long description:
Uses SendGrid to deliver emails for the Mailster Newsletter Plugin for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected482 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3180144482

PHP code Passed 2 tests

A brief analysis 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.44
Average class complexity83.00
▷ Minimum class complexity83.00
▷ Maximum class complexity83.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1995.00%
▷ Protected methods00.00%
▷ Private methods15.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin