78% contact-manager-for-sendgrid

Code Review | Easily integrate SendGrid with your WordPress site

WordPress plugin Easily integrate SendGrid with your WordPress site scored78%from 54 tests.

About plugin

  • Plugin page: contact-manager-f...
  • Plugin version: 1.2
  • PHP compatiblity: 8.0.10+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Feb 17, 2022
  • Latest release: Dec 3, 2022
  • Number of updates: 4
  • Update frequency: every 72.3 days
  • Top authors: zebfross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /565 total downloads

Benchmarks

Plugin footprint 83% from 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.08MB] [CPU: ▼15.27ms] Passed 4 tests

An overview of server-side resources used by Easily integrate SendGrid with your WordPress site
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.35 ▲7.61
Dashboard /wp-admin3.39 ▲0.0553.71 ▼2.68
Posts /wp-admin/edit.php3.50 ▲0.1558.13 ▲6.26
Add New Post /wp-admin/post-new.php5.97 ▲0.09104.63 ▼70.80
Media Library /wp-admin/upload.php3.31 ▲0.0941.41 ▲6.13
Contacts for SendGrid /wp-admin/options-general.php?page=contacts-for-sendgrid3.2944.93

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Easily integrate SendGrid with your WordPress site
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.17 ▼1.511.84 ▼0.0246.10 ▲5.10
Dashboard /wp-admin2,207 ▲186.06 ▲0.17115.87 ▲12.1447.61 ▲2.69
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0542.55 ▲1.6438.28 ▲0.99
Add New Post /wp-admin/post-new.php1,536 ▲1723.06 ▼0.25677.44 ▼15.9063.16 ▲10.61
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.09114.04 ▲7.1253.83 ▲4.46
Contacts for SendGrid /wp-admin/options-general.php?page=contacts-for-sendgrid8282.0231.7740.07

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/contact-manager-for-sendgrid/views/header.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/contact-manager-for-sendgrid/views/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ContactManagerForSendGrid\\add_filter() in wp-content/plugins/contact-manager-for-sendgrid/includes/wpforms/SendGridWpformsCMFS.php:119
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/contact-manager-for-sendgrid/tests/SendGridTest.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ContactManagerForSendGrid\\add_filter() in wp-content/plugins/contact-manager-for-sendgrid/includes/wpforms/SendGridWpformsCMFS.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (General settings), #2 (WPForms settings)
Please take inspiration from this readme.txt

contact-manager-for-sendgrid/contact-manager-for-sendgrid.php Passed 13 tests

The principal PHP file in "Easily integrate SendGrid with your WordPress site" v. 1.2 is loaded by WordPress automatically on each request
54 characters long description:
A plugin for adding contacts to SendGrid contact lists

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin424 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP67051424

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.25
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods311.11%
▷ Public methods2281.48%
▷ Protected methods13.70%
▷ Private methods414.81%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.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
No PNG images were found in this plugin