83% bigsendgrid

Code Review | Big Mailer - SendGrid

WordPress plugin Big Mailer - SendGrid scored83%from 54 tests.

About plugin

  • Plugin page: bigsendgrid
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2012
  • Latest release: Oct 17, 2013
  • Number of updates: 6
  • Update frequency: every 53.2 days
  • Top authors: bigemployee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,748 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.89ms] Passed 4 tests

Analyzing server-side resources used by Big Mailer - SendGrid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.05 ▼3.60
Dashboard /wp-admin3.35 ▲0.0445.22 ▼9.63
Posts /wp-admin/edit.php3.40 ▲0.0446.18 ▲0.51
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.49 ▼18.82
Media Library /wp-admin/upload.php3.27 ▲0.0437.74 ▲0.96
Big Mailer/SendGrid /wp-admin/options-general.php?page=bigmailer3.2532.21

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 175 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Big Mailer - SendGrid
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.52 ▲0.401.91 ▼4.2339.45 ▼3.59
Dashboard /wp-admin2,215 ▲305.86 ▼0.0198.25 ▼14.8340.85 ▼6.31
Posts /wp-admin/edit.php2,095 ▲62.01 ▲0.0134.82 ▼0.4432.87 ▼1.07
Add New Post /wp-admin/post-new.php1,533 ▲1423.04 ▼0.33672.35 ▲6.4551.95 ▼1.64
Media Library /wp-admin/upload.php1,394 ▲94.25 ▲0.0195.83 ▼8.0141.55 ▼3.92
Big Mailer/SendGrid /wp-admin/options-general.php?page=bigmailer8572.1726.1527.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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
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
The following issues need your attention
  • 123× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Encoder' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Encoder/QpEncoder.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Swift_Plugins_BandwidthMonitorPlugin' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Plugins/ThrottlerPlugin.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Swift_Transport_SendmailTransport' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/SendmailTransport.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_InputByteStream' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/KeyCache/KeyCacheInputStream.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Events_TransportChangeListener' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Plugins/PopBeforeSmtpPlugin.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Events_EventListener' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Events/CommandListener.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Mime_CharsetObserver' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Mime/HeaderFactory.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Mime_CharsetObserver' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Encoder.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Transport_Esmtp_Authenticator' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Swift_Mime_HeaderSet' not found in wp-content/plugins/bigsendgrid/sendgrid-php/lib/swift/classes/Swift/Mime/SimpleHeaderSet.php:20

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Settings Page) image missing
The official readme.txt is a good inspiration

bigsendgrid/BigMailer.php 85% from 13 tests

The principal PHP file in "Big Mailer - SendGrid" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: The plugin description must be longer than 10 characters (currently 0 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bigsendgrid.php" instead of "BigMailer.php")

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 detected9,221 lines of code in 168 files:
LanguageFilesBlank linesComment linesLines of code
PHP1652,2417,7649,076
Markdown1480127
JSON1009
JavaScript1309

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.81
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces45
Traits0
Classes109
▷ Abstract classes54.59%
▷ Concrete classes10495.41%
▷ Final classes00.00%
Methods977
▷ Static methods282.87%
▷ Public methods83385.26%
▷ Protected methods646.55%
▷ Private methods808.19%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants40
▷ Global constants410.00%
▷ Class constants3690.00%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png48.08KB19.45KB▼ 59.55%