88% mailgun-email-validator

Code Review | Mailgun Email Validator

WordPress plugin Mailgun Email Validator scored 88% from 54 tests.

About plugin

  • Plugin page: mailgun-email-val...
  • Plugin version: 1.2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.9
  • WordPress version: 5.8.1
  • First release: Oct 5, 2013
  • Latest release: Nov 25, 2017
  • Number of updates: 29
  • Update frequency: every 52.4 days
  • Top authors: jesin (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

200+ active / 10,058 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼145.42ms] Passed 4 tests

This is a short check of server-side resources used by Mailgun Email Validator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0141.14 ▲7.16
Dashboard /wp-admin3.13 ▲0.0847.86 ▲0.51
Posts /wp-admin/edit.php3.19 ▲0.0844.63 ▼2.93
Add New Post /wp-admin/post-new.php5.49 ▲0.0687.21 ▼580.01
Media Library /wp-admin/upload.php3.08 ▲0.0835.35 ▲0.75
Email Validation /wp-admin/options-general.php?page=mailgun-email-validator3.0227.92

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Mailgun Email Validator: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲12016.04 ▲0.3510.80 ▼2.4549.35 ▲0.58
Dashboard /wp-admin2,983 ▲465.92 ▼0.02151.87 ▼5.53118.69 ▲3.75
Posts /wp-admin/edit.php2,753 ▲142.71 ▼0.0168.05 ▼27.9287.26 ▼0.91
Add New Post /wp-admin/post-new.php1,509 ▲1118.58 ▼0.32389.48 ▼94.39107.37 ▲4.98
Media Library /wp-admin/upload.php1,762 ▼454.99 ▲0.00159.10 ▼3.98114.76 ▲4.59
Email Validation /wp-admin/options-general.php?page=mailgun-email-validator1,0762.1052.9477.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=mailgun-email-validator
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=mailgun-email-validator
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mailgun-email-validator/plugin.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mailgun-email-validator/admin_options.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: email validation, contact form 7, anti-spam, comments, validation...

mailgun-email-validator/plugin.php 85% from 13 tests

The main file in "Mailgun Email Validator" v. 1.2.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mailgun-email-validator.php" instead of "plugin.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 252 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected908 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45343738
PO File24848170

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity32.20
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screen-icon.png1.15KB1.29KB0.00%