73% wp-mail-smtp

Code Review | WP Mail SMTP by WPForms

WordPress plugin WP Mail SMTP by WPForms scored 73% from 54 tests.

About plugin

  • Plugin page: wp-mail-smtp
  • Plugin version: 3.3.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 5.9.2
  • First release: Sep 12, 2007
  • Latest release: Feb 17, 2022
  • Number of updates: 154
  • Update frequency: every 34.3 days
  • Top authors: chmac (44.16%)slaFFik (28.57%)jaredatch (15.58%)capuderg (11.04%)smub (3.25%)

Code review

54 tests

User reviews

2960 reviews

Install metrics

2,000,000+ active / 29,457,246 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.47MB] [CPU: ▼286.80ms] Passed 4 tests

Analyzing server-side resources used by WP Mail SMTP by WPForms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4260.67 ▲7.68
Dashboard /wp-admin3.90 ▲0.4941.16 ▲8.27
Posts /wp-admin/edit.php4.12 ▲0.4846.98 ▲5.34
Add New Post /wp-admin/post-new.php7.44 ▲0.47104.82 ▼1,165.80
Media Library /wp-admin/upload.php3.84 ▲0.5429.87 ▲5.59
Tools /wp-admin/admin.php?page=wp-mail-smtp-tools4.0447.15
Settings /wp-admin/admin.php?page=wp-mail-smtp3.9938.23
Email Reports /wp-admin/admin.php?page=wp-mail-smtp-reports3.8533.08
Email Log /wp-admin/admin.php?page=wp-mail-smtp-logs3.7123.60
/wp-admin/admin.php?page=wp-mail-smtp-setup-wizard3.7828.79
About Us /wp-admin/admin.php?page=wp-mail-smtp-about3.9135.41

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 1,211 new files
Database: 6 new tables, 9 new options
New tables
wp_wpmailsmtp_debug_events
wp_actionscheduler_actions
wp_actionscheduler_logs
wp_actionscheduler_groups
wp_wpmailsmtp_tasks_meta
wp_actionscheduler_claims
New WordPress options
action_scheduler_lock_async-request-runner
wp_mail_smtp_migration_version
wp_mail_smtp_activation_prevent_redirect
wp_mail_smtp_review_notice
schema-ActionScheduler_LoggerSchema
schema-ActionScheduler_StoreSchema
wp_mail_smtp_activated
action_scheduler_hybrid_store_demarkation
wp_mail_smtp_debug_events_db_version

Browser metrics Passed 4 tests

WP Mail SMTP by WPForms: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,238 ▲48317.57 ▲1.875.93 ▼0.881.98 ▼0.52
Dashboard /wp-admin3,367 ▲5066.98 ▲0.66149.70 ▲16.22210.50 ▲50.10
Posts /wp-admin/edit.php2,750 ▲563.25 ▲0.0168.84 ▲3.13148.82 ▲2.67
Add New Post /wp-admin/post-new.php1,691 ▼516.65 ▼4.25383.20 ▼46.24158.46 ▼0.27
Media Library /wp-admin/upload.php1,764 ▲665.56 ▲0.03138.71 ▼5.03199.25 ▲8.71
Tools /wp-admin/admin.php?page=wp-mail-smtp-tools1,4232.7169.54151.49
Settings /wp-admin/admin.php?page=wp-mail-smtp3,8333.0674.93231.19
Email Reports /wp-admin/admin.php?page=wp-mail-smtp-reports1,4142.7159.77124.43
Email Log /wp-admin/admin.php?page=wp-mail-smtp-logs1,4732.8662.00137.15
/wp-admin/admin.php?page=wp-mail-smtp-setup-wizard3583.2284.2689.75
About Us /wp-admin/admin.php?page=wp-mail-smtp-about2,4063.1167.37168.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables detected upon uninstall: 6 tables
    • wp_actionscheduler_actions
    • wp_actionscheduler_logs
    • wp_wpmailsmtp_tasks_meta
    • wp_wpmailsmtp_debug_events
    • wp_actionscheduler_groups
    • wp_actionscheduler_claims
  • Zombie WordPress options were found after uninstall: 9 options
    • wp_mail_smtp_migration_version
    • schema-ActionScheduler_StoreSchema
    • wp_mail_smtp_activation_prevent_redirect
    • action_scheduler_lock_async-request-runner
    • wp_mail_smtp_activated
    • action_scheduler_hybrid_store_demarkation
    • wp_mail_smtp_review_notice
    • wp_mail_smtp_debug_events_db_version
    • schema-ActionScheduler_LoggerSchema

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 | 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
The following issues need your attention
  • 801× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Vendor\\phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS8' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_BLAKE2b' not found in wp-content/plugins/wp-mail-smtp/libs/sodium_compat/namespaced/Core/BLAKE2b.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Vendor\\phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS1' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php:46
    • > PHP Fatal error
      Uncaught Error: Interface 'WPMailSMTP\\Vendor\\SendinBlue\\Client\\Model\\ModelInterface' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/sendinblue/api-v3-sdk/lib/Model/RemainingCreditModel.php:40
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-mail-smtp/src/Admin/PluginsInstallUpgrader.php on line 10
    • > PHP Warning
      Class 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\AuthHandlerFactory' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/google/apiclient/src/aliases.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Vendor\\Google\\Service\\Resource' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsFilters.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WPMailSMTP\\Vendor\\phpseclib3\\Crypt\\EC\\Curves\\secp521r1' not found in wp-content/plugins/wp-mail-smtp/vendor_prefixed/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp521.php:17
    • > 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 Warning
      Class 'WPMailSMTP\\Vendor\\Google\\Utils\\UriTemplate' 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 | 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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt might help

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

The main PHP file in "WP Mail SMTP by WPForms" ver. 3.3.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 178 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-mail-smtp.php" instead of "wp_mail_smtp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin123,344 lines of code in 1,128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,01010,536101,561121,707
JavaScript213436131,211
CSS125925248
SVG8500178

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.89
▷ Minimum class complexity1.00
▷ Maximum class complexity814.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces108
Interfaces48
Traits11
Classes931
▷ Abstract classes12613.53%
▷ Concrete classes80586.47%
▷ Final classes384.72%
Methods9,760
▷ Static methods2,10721.59%
▷ Public methods8,60188.12%
▷ Protected methods7077.24%
▷ Private methods4524.63%
Functions816
▷ Named functions29035.54%
▷ Anonymous functions52664.46%
Constants1,090
▷ Global constants575.23%
▷ Class constants1,03394.77%
▷ Public constants1,033100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
50 PNG files occupy 0.75MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vue/img/instagram-feed@2x.png4.90KB2.75KB▼ 43.89%
assets/images/reports/email/wp-mail-smtp-logo-dark-whitelabel.png9.84KB6.75KB▼ 31.42%
assets/images/logs/single.png82.96KB87.36KB0.00%
assets/vue/img/wp-smtp.png4.94KB2.75KB▼ 44.43%
assets/images/logs/archive.png128.31KB135.03KB0.00%