84% wp-mailgun-smtp

Code Review | WP Mailgun SMTP

WordPress plugin WP Mailgun SMTP scored84%from 54 tests.

About plugin

  • Plugin page: wp-mailgun-smtp
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 3, 2016
  • Latest release: Aug 21, 2018
  • Number of updates: 36
  • Update frequency: every 19.1 days
  • Top authors: inkthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /20,355 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.70ms] Passed 4 tests

An overview of server-side resources used by WP Mailgun SMTP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.17 ▼1.63
Dashboard /wp-admin3.33 ▲0.0345.02 ▼2.32
Posts /wp-admin/edit.php3.38 ▲0.0346.86 ▼1.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.34 ▼5.18
Media Library /wp-admin/upload.php3.26 ▲0.0335.98 ▼0.78

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mailgun SMTP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.16 ▼0.421.58 ▼0.0337.66 ▼3.04
Dashboard /wp-admin2,229 ▲415.83 ▼0.02104.91 ▲4.5840.89 ▼3.58
Posts /wp-admin/edit.php2,115 ▲472.01 ▼0.0243.11 ▲6.3838.49 ▲2.64
Add New Post /wp-admin/post-new.php1,561 ▲2622.57 ▼0.76668.11 ▼21.4852.87 ▼1.20
Media Library /wp-admin/upload.php1,417 ▲264.28 ▲0.0498.31 ▼15.4042.66 ▼4.38

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-mailgun-smtp/wp-mailgun-smtp.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

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

The main PHP script in "WP Mailgun SMTP" version 1.0.7 is automatically included on every request by WordPress
92 characters long description:
WP Mailgun SMTP allows you to send all outgoing emails via Mailgun from your WordPress site.

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
Everything looks great! No dangerous files found in this plugin547 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP59790547

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png86.19KB38.54KB▼ 55.28%
screenshot-2.png60.53KB26.88KB▼ 55.59%
m_bolt_img.png22.17KB8.42KB▼ 62.01%