83% send-emails-with-mandrill

Code Review | Send Emails with Mandrill

WordPress plugin Send Emails with Mandrill scored83%from 54 tests.

About plugin

  • Plugin page: send-emails-with-...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 6, 2018
  • Latest release: Jan 5, 2023
  • Number of updates: 41
  • Update frequency: every 39.3 days
  • Top authors: MillerMediaNow (92.68%)millermediadev (9.76%)

Code review

54 tests

User reviews

8 reviews

Install metrics

8,000+ active /134,138 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.33MB] [CPU: ▼0.42ms] Passed 4 tests

This is a short check of server-side resources used by Send Emails with Mandrill
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3248.02 ▲1.32
Dashboard /wp-admin3.64 ▲0.3352.42 ▼3.12
Posts /wp-admin/edit.php3.75 ▲0.3953.34 ▼2.10
Add New Post /wp-admin/post-new.php6.22 ▲0.3393.23 ▲2.24
Media Library /wp-admin/upload.php3.56 ▲0.3342.15 ▲4.19
Mandrill /wp-admin/options-general.php?page=wpmandrill3.5939.77

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Send Emails with Mandrill
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.20 ▲0.051.92 ▲0.0342.44 ▼5.09
Dashboard /wp-admin2,200 ▲235.59 ▼0.0987.17 ▼6.0938.38 ▼0.90
Posts /wp-admin/edit.php2,108 ▲112.06 ▲0.0935.64 ▼6.5931.29 ▼10.36
Add New Post /wp-admin/post-new.php1,542 ▲1618.13 ▼5.33650.66 ▼66.0170.65 ▲8.32
Media Library /wp-admin/upload.php1,405 ▲54.23 ▲0.0296.94 ▼8.9440.25 ▼5.97
Mandrill /wp-admin/options-general.php?page=wpmandrill9142.1827.2138.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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
Good news, no errors were detected

SRP 50% 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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/send-emails-with-mandrill/lib/pluginActivation.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/send-emails-with-mandrill/legacy/function.wp_mail.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/send-emails-with-mandrill/lib/wpMandrill.class.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/send-emails-with-mandrill/stats.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Settings screen), #2 (Statistics), #3 (Dashboard widget), #4 (Dashboard widget Settings)
The official readme.txt might help

send-emails-with-mandrill/wpmandrill.php 85% from 13 tests

Analyzing the main PHP file in "Send Emails with Mandrill" version 1.3.1
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("send-emails-with-mandrill.php" instead of "wpmandrill.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,230 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP85844372,383
JavaScript44402952,193
PO File2267342572
CSS16067
Markdown19015

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity54.60
▷ Minimum class complexity1.00
▷ Maximum class complexity220.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods122
▷ Static methods8368.03%
▷ Public methods122100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mandrill-head-icon.png2.50KB1.72KB▼ 31.08%
images/MandrillHead.png8.28KB3.86KB▼ 53.43%
images/FreddieHead.png7.60KB3.65KB▼ 51.98%