74% mailhawk

Code Review | WordPress SMTP Service, Email Delivery Solved! — MailHawk

WordPress plugin WordPress SMTP Service, Email Delivery Solved! — MailHawk scored74%from 54 tests.

About plugin

  • Plugin page: mailhawk
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: Oct 23, 2023
  • Number of updates: 29
  • Update frequency: every 43.1 days
  • Top authors: trainingbusinesspros (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /75,906 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.60MB] [CPU: ▲1.77ms] Passed 4 tests

Server-side resources used by WordPress SMTP Service, Email Delivery Solved! — MailHawk
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4740.70 ▲1.71
Dashboard /wp-admin3.94 ▲0.6447.15 ▲2.20
Posts /wp-admin/edit.php3.99 ▲0.6446.03 ▼1.03
Add New Post /wp-admin/post-new.php6.55 ▲0.6786.17 ▲5.70
Media Library /wp-admin/upload.php3.86 ▲0.6439.95 ▲4.18
MailHawk /wp-admin/tools.php?page=mailhawk3.8536.95

Server storage [IO: ▲1.95MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 62 new files
Database: 2 new tables, 10 new options
New tables
wp_mh_email_addresses
wp_mh_email_log
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
mailhawk_mailhawk_version_updates
wp_mh_email_log_db_version
widget_theysaidso_widget
theysaidso_admin_options
wp_mh_email_addresses_db_version
mailhawk_mailhawk_installed
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WordPress SMTP Service, Email Delivery Solved! — MailHawk
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6814.61 ▲0.331.70 ▲0.0441.82 ▼1.88
Dashboard /wp-admin2,227 ▲505.61 ▼0.0283.80 ▼23.4572.76 ▲27.49
Posts /wp-admin/edit.php2,130 ▲302.00 ▲0.0234.75 ▼3.4933.71 ▼3.29
Add New Post /wp-admin/post-new.php1,578 ▲5218.17 ▼4.70616.84 ▼60.50111.57 ▲52.09
Media Library /wp-admin/upload.php1,429 ▲264.26 ▼0.1597.68 ▼11.5279.66 ▲32.37
MailHawk /wp-admin/tools.php?page=mailhawk8232.0428.3652.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_mh_email_log
    • wp_mh_email_addresses
  • Zombie WordPress options were found after uninstall: 9 options
    • wp_mh_email_addresses_db_version
    • wp_mh_email_log_db_version
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • mailhawk_mailhawk_version_updates

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 34× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mailhawk/admin/views/legal.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'MailHawk\\Api\\Postal\\Domains' not found in wp-content/plugins/mailhawk/admin/views/dns-single-old.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/mailhawk/admin/views/settings.php on line 14
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailhawk/includes/hawk-mailer.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'MailHawk\\Keys' not found in wp-content/plugins/mailhawk/admin/views/suspended.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MailHawk\\Api\\Postal\\Postal' not found in wp-content/plugins/mailhawk/includes/api/postal/reporting.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MailHawk\\Api\\Postal\\Domains' not found in wp-content/plugins/mailhawk/admin/views/domains.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mailhawk/admin/views/test.php:5
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mailhawk/admin/views/settings.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'MailHawk\\Api\\Postal\\Domains' not found in wp-content/plugins/mailhawk/admin/views/dns.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: smtp, smtp plugin, wordpress smtp, email, wp mail smtp

mailhawk/mailhawk.php Passed 13 tests

The main PHP script in "WordPress SMTP Service, Email Delivery Solved! — MailHawk" version 1.2.2 is automatically included on every request by WordPress
58 characters long description:
Send better email that will reach the inbox with MailHawk.

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
Success! There were no dangerous files found in this plugin31,759 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65,5524,90026,628
PHP491,6612,4924,748
CSS18610383

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.33
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes27
▷ Abstract classes414.81%
▷ Concrete classes2385.19%
▷ Final classes00.00%
Methods295
▷ Static methods3712.54%
▷ Public methods21974.24%
▷ Protected methods6622.37%
▷ Private methods103.39%
Functions62
▷ Named functions5791.94%
▷ Anonymous functions58.06%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/hawk-head.png16.95KB6.37KB▼ 62.44%
assets/images/logo.png15.61KB6.22KB▼ 60.13%
assets/images/hawk.png21.97KB7.88KB▼ 64.15%
assets/images/groundhogg-ad.png111.70KB39.69KB▼ 64.47%