67% wp-mail-smtp

Code Review | WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin

WordPress plugin WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin scored67%from 54 tests.

About plugin

  • Plugin page: wp-mail-smtp
  • Plugin version: 3.10.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Sep 12, 2007
  • Latest release: Nov 8, 2023
  • Number of updates: 165
  • Update frequency: every 35.8 days
  • Top authors: chmac (41.21%)slaFFik (27.27%)capuderg (15.76%)jaredatch (14.55%)smub (3.03%)

Code review

54 tests

User reviews

4108 reviews

Install metrics

3,000,000+ active /45,723,488 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲3.84MB] [CPU: ▲28.16ms] Passed 4 tests

An overview of server-side resources used by WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin
This plugin does not affect your website's performance
Page Memory (MB) CPU Time (ms)
Home / 6.33 ▲2.86 65.89 ▲24.44
Dashboard /wp-admin 7.54 ▲4.23 77.62 ▲29.21
Posts /wp-admin/edit.php 7.57 ▲4.21 85.17 ▲35.71
Add New Post /wp-admin/post-new.php 10.04 ▲4.15 114.04 ▲23.27
Media Library /wp-admin/upload.php 7.38 ▲4.15 72.05 ▲35.84
/wp-admin/admin.php?page=wp-mail-smtp-setup-wizard 7.77 59.61
Tools /wp-admin/admin.php?page=wp-mail-smtp-tools 8.30 72.52
Email Reports /wp-admin/admin.php?page=wp-mail-smtp-reports 7.79 71.08
Settings /wp-admin/admin.php?page=wp-mail-smtp 8.10 75.75
About Us /wp-admin/admin.php?page=wp-mail-smtp-about 7.99 68.18
Email Log /wp-admin/admin.php?page=wp-mail-smtp-logs 7.25 54.45

Server storage [IO: ▲5.95MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 793 new files
Database: 6 new tables, 15 new options
New tables
wp_actionscheduler_groups
wp_wpmailsmtp_tasks_meta
wp_actionscheduler_claims
wp_actionscheduler_logs
wp_wpmailsmtp_debug_events
wp_actionscheduler_actions
New WordPress options
db_upgraded
action_scheduler_hybrid_store_demarkation
wp_mail_smtp_debug_events_db_version
schema-ActionScheduler_LoggerSchema
action_scheduler_lock_async-request-runner
wp_mail_smtp_review_notice
widget_recent-comments
wp_mail_smtp_migration_version
wp_mail_smtp_activated
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin
This plugin has a minimal impact on browser resources
Page Nodes Memory (MB) Script (ms) Layout (ms)
Home / 3,141 ▲379 14.58 ▲0.26 2.07 ▲0.05 30.74 ▼10.79
Dashboard /wp-admin 2,532 ▲352 6.20 ▲0.49 128.45 ▲34.26 90.10 ▲49.45
Posts /wp-admin/edit.php 2,161 ▲61 2.00 ▲0.01 39.72 ▼1.90 34.38 ▼2.71
Add New Post /wp-admin/post-new.php 1,561 ▲35 22.11 ▼0.81 682.92 ▼4.10 51.04 ▼2.00
Media Library /wp-admin/upload.php 1,459 ▲56 4.17 ▼0.02 97.29 ▼3.13 39.61 ▼1.85
/wp-admin/admin.php?page=wp-mail-smtp-setup-wizard 321 2.89 60.12 22.77
Tools /wp-admin/admin.php?page=wp-mail-smtp-tools 1,203 1.88 35.69 43.69
Email Reports /wp-admin/admin.php?page=wp-mail-smtp-reports 1,218 2.01 42.56 36.04
Settings /wp-admin/admin.php?page=wp-mail-smtp 2,980 2.22 41.01 68.70
About Us /wp-admin/admin.php?page=wp-mail-smtp-about 1,930 2.21 40.79 90.03
Email Log /wp-admin/admin.php?page=wp-mail-smtp-logs 1,266 2.01 30.32 37.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 6 tables
    • wp_actionscheduler_actions
    • wp_wpmailsmtp_debug_events
    • wp_wpmailsmtp_tasks_meta
    • wp_actionscheduler_groups
    • wp_actionscheduler_claims
    • wp_actionscheduler_logs
  • Zombie WordPress options detected upon uninstall: 15 options
    • schema-ActionScheduler_StoreSchema
    • action_scheduler_lock_async-request-runner
    • wp_mail_smtp_activated
    • widget_recent-posts
    • wp_mail_smtp_review_notice
    • widget_theysaidso_widget
    • wp_mail_smtp_migration_version
    • theysaidso_admin_options
    • wp_mail_smtp_activation_prevent_redirect
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-mail-smtp-tools
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
Please fix the following
  • 372× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php:118
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Vendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Handler/StreamHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Vendor\\Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Vendor\\Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LineFormatter.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Providers\\MailerAbstract' not found in wp-content/plugins/wp-mail-smtp/src/Providers/Sendgrid/Mailer.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'WPMailSMTP\\Vendor\\Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Providers\\OptionsAbstract' not found in wp-content/plugins/wp-mail-smtp/src/Providers/Sendlayer/Options.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Providers\\MailerAbstract' not found in wp-content/plugins/wp-mail-smtp/src/Providers/Pepipost/Mailer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_ListTable' not found in wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_ListTable.php:7
    • > PHP Warning
      Class 'WPMailSMTP\\Vendor\\Google\\AccessToken\\Verify' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/google/apiclient/src/aliases.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-mail-smtp/wp_mail_smtp.php 85% from 13 tests

The primary PHP file in "WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin" version 3.10.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-mail-smtp.php" instead of "wp_mail_smtp.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 178 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin52,841 lines of code in 707 files:
Language Files Blank lines Comment lines Lines of code
PHP 582 8,098 36,284 51,153
JavaScript 20 353 622 1,243
CSS 13 59 25 249
SVG 92 0 0 196

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code 0.39
Average class complexity 12.16
▷ Minimum class complexity 1.00
▷ Maximum class complexity 345.00
Average method complexity 2.68
▷ Minimum method complexity 1.00
▷ Maximum method complexity 119.00
Code structure
Namespaces 70
Interfaces 57
Traits 11
Classes 505
▷ Abstract classes 40 7.92%
▷ Concrete classes 465 92.08%
▷ Final classes 41 8.82%
Methods 3,907
▷ Static methods 495 12.67%
▷ Public methods 3,098 79.29%
▷ Protected methods 422 10.80%
▷ Private methods 387 9.91%
Functions 254
▷ Named functions 107 42.13%
▷ Anonymous functions 147 57.87%
Constants 338
▷ Global constants 52 15.38%
▷ Class constants 286 84.62%
▷ Public constants 275 96.15%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
53 compressed PNG files occupy 1.00MB
Potential savings
Compression of 5 random PNG files using pngquant
File Size - original Size - compressed Savings
assets/images/about/sugar-calendar.png 1.66KB 1.86KB 0.00%
assets/images/about/duplicator-icon-large.png 4.86KB 4.89KB 0.00%
assets/images/about/plugin-om.png 9.99KB 10.58KB 0.00%
assets/images/email/icon-check.png 1.07KB 1.13KB 0.00%
assets/images/additional-connections/screenshot-01.png 132.52KB 141.12KB 0.00%