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
PageMemory (MB)CPU Time (ms)
Home /6.33 ▲2.8665.89 ▲24.44
Dashboard /wp-admin7.54 ▲4.2377.62 ▲29.21
Posts /wp-admin/edit.php7.57 ▲4.2185.17 ▲35.71
Add New Post /wp-admin/post-new.php10.04 ▲4.15114.04 ▲23.27
Media Library /wp-admin/upload.php7.38 ▲4.1572.05 ▲35.84
/wp-admin/admin.php?page=wp-mail-smtp-setup-wizard7.7759.61
Tools /wp-admin/admin.php?page=wp-mail-smtp-tools8.3072.52
Email Reports /wp-admin/admin.php?page=wp-mail-smtp-reports7.7971.08
Settings /wp-admin/admin.php?page=wp-mail-smtp8.1075.75
About Us /wp-admin/admin.php?page=wp-mail-smtp-about7.9968.18
Email Log /wp-admin/admin.php?page=wp-mail-smtp-logs7.2554.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
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,141 ▲37914.58 ▲0.262.07 ▲0.0530.74 ▼10.79
Dashboard /wp-admin2,532 ▲3526.20 ▲0.49128.45 ▲34.2690.10 ▲49.45
Posts /wp-admin/edit.php2,161 ▲612.00 ▲0.0139.72 ▼1.9034.38 ▼2.71
Add New Post /wp-admin/post-new.php1,561 ▲3522.11 ▼0.81682.92 ▼4.1051.04 ▼2.00
Media Library /wp-admin/upload.php1,459 ▲564.17 ▼0.0297.29 ▼3.1339.61 ▼1.85
/wp-admin/admin.php?page=wp-mail-smtp-setup-wizard3212.8960.1222.77
Tools /wp-admin/admin.php?page=wp-mail-smtp-tools1,2031.8835.6943.69
Email Reports /wp-admin/admin.php?page=wp-mail-smtp-reports1,2182.0142.5636.04
Settings /wp-admin/admin.php?page=wp-mail-smtp2,9802.2241.0168.70
About Us /wp-admin/admin.php?page=wp-mail-smtp-about1,9302.2140.7990.03
Email Log /wp-admin/admin.php?page=wp-mail-smtp-logs1,2662.0130.3237.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:
LanguageFilesBlank linesComment linesLines of code
PHP5828,09836,28451,153
JavaScript203536221,243
CSS135925249
SVG9200196

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 code0.39
Average class complexity12.16
▷ Minimum class complexity1.00
▷ Maximum class complexity345.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces70
Interfaces57
Traits11
Classes505
▷ Abstract classes407.92%
▷ Concrete classes46592.08%
▷ Final classes418.82%
Methods3,907
▷ Static methods49512.67%
▷ Public methods3,09879.29%
▷ Protected methods42210.80%
▷ Private methods3879.91%
Functions254
▷ Named functions10742.13%
▷ Anonymous functions14757.87%
Constants338
▷ Global constants5215.38%
▷ Class constants28684.62%
▷ Public constants27596.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
FileSize - originalSize - compressedSavings
assets/images/about/sugar-calendar.png1.66KB1.86KB0.00%
assets/images/about/duplicator-icon-large.png4.86KB4.89KB0.00%
assets/images/about/plugin-om.png9.99KB10.58KB0.00%
assets/images/email/icon-check.png1.07KB1.13KB0.00%
assets/images/additional-connections/screenshot-01.png132.52KB141.12KB0.00%