10% post-smtp

Code Review | POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress

WordPress plugin POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: post-smtp
  • Plugin version: 2.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2017
  • Latest release: Nov 23, 2023
  • Number of updates: 465
  • Update frequency: every 4.8 days
  • Top authors: wpexpertsio (54.84%)yehudah (45.38%)

Code review

54 tests

User reviews

409 reviews

Install metrics

300,000+ active /10,390,403 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/post-smtp/Postman/PostmanUtils.php+261
    unlink(/tmp/.postman_9c8bff77.lock): No such file or directory

Server metrics [RAM: ▲6.73MB] [CPU: ▲50.52ms] 50% from 4 tests

A check of server-side resources used by POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress
Please take the time to fix the following items
  • RAM: Total memory usage should be kept under 10MB (currently 10.20MB on /wp-admin/admin.php?page=postman/manage-options)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 6.73MB on /wp-admin/admin.php?page=postman/manage-options)
PageMemory (MB)CPU Time (ms)
Home /9.26 ▲5.7983.89 ▲37.79
Dashboard /wp-admin10.37 ▲7.02105.65 ▲42.15
Posts /wp-admin/edit.php10.41 ▲7.05112.55 ▲60.69
Add New Post /wp-admin/post-new.php12.97 ▲7.08153.12 ▲61.46
Media Library /wp-admin/upload.php10.29 ▲7.05104.02 ▲67.68
Credits /wp-admin/index.php?page=post-credits10.2092.41
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius10.4691.25
Welcome /wp-admin/index.php?page=post-about10.2097.94
Postman SMTP /wp-admin/admin.php?page=postman/diagnostics10.2086.94
Postman SMTP /wp-admin/admin.php?page=postman/port_test10.2087.17
Postman SMTP /wp-admin/admin.php?page=postman/email_test10.2090.61
Post SMTP /wp-admin/admin.php?page=postman/manage-options10.2097.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 1,531 new files
Database: 2 new tables, 12 new options
New tables
wp_post_smtp_logmeta
wp_post_smtp_logs
New WordPress options
can_compress_scripts
fs_debug_mode
postman_db_version
widget_theysaidso_widget
postman_state
postman_options
fs_accounts
db_upgraded
widget_recent-posts
fs_active_plugins
...

Browser metrics Passed 4 tests

A check of browser resources used by POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18514.35 ▲0.071.71 ▲0.0429.99 ▼13.55
Dashboard /wp-admin2,340 ▲1634.84 ▼0.80103.05 ▲5.8045.96 ▲3.47
Posts /wp-admin/edit.php2,183 ▲832.33 ▲0.3740.56 ▼0.2237.32 ▼3.00
Add New Post /wp-admin/post-new.php1,585 ▲5922.13 ▼0.88670.40 ▼7.9734.32 ▼23.91
Media Library /wp-admin/upload.php1,482 ▲824.27 ▲0.00101.01 ▲5.6747.44 ▲6.05
Credits /wp-admin/index.php?page=post-credits9272.2230.1651.75
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1141.7625.9326.96
Welcome /wp-admin/index.php?page=post-about9612.3931.2655.92
Postman SMTP /wp-admin/admin.php?page=postman/diagnostics8962.1543.9926.96
Postman SMTP /wp-admin/admin.php?page=postman/port_test1,1302.2039.8732.12
Postman SMTP /wp-admin/admin.php?page=postman/email_test1,0972.5944.7239.70
Post SMTP /wp-admin/admin.php?page=postman/manage-options9391.8926.9328.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/post-smtp/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_post_smtp_logs
    • wp_post_smtp_logmeta
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • postman_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • fs_accounts
    • db_upgraded
    • postman_db_version
    • postman_state
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=postman/diagnostics
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/post-smtp/Postman/Postman-Connectivity-Test/Postman-PortTest.php+76
    stream_socket_client(): unable to connect to localhost:25 (Connection refused)

SRP 0% 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 items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/post-smtp/Postman/Postman-Connectivity-Test/registered-domain-libs-master/PHP/test-regDomain.php
    • > /wp-content/plugins/post-smtp/Postman/Mobile/includes/phpqrcode/index.php
    • > /wp-content/plugins/post-smtp/Postman/Postman-Connectivity-Test/registered-domain-libs-master/generateEffectiveTLDs.php
  • 500× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PostSMTP\\Vendor\\phpseclib3\\Crypt\\DSA' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php:22
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Exception.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-smtp/Postman/Postman-Mail/Zend-1.12.10/Mime/Exception.php on line 25
    • > PHP Fatal error
      Uncaught Error: Interface 'PostSMTP\\Vendor\\Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Mail/Storage/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-smtp/Postman/Postman-Mail/Zend-1.12.10/Mail/Storage/Pop3.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'PostSMTP\\Vendor\\Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PostSMTP\\Vendor\\Google\\Model' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/google/apiclient-services/src/Gmail/SendAs.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PostSMTP\\Vendor\\phpseclib3\\Crypt\\EC\\Curves\\sect283k1' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk283.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PostSMTP\\Vendor\\Google\\Collection' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/google/apiclient-services/src/Gmail/ListDelegatesResponse.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PostSMTP\\Vendor\\phpseclib3\\Crypt\\EC\\Curves\\sect233k1' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk233.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PostSMTP\\Vendor\\Google\\Model' not found in wp-content/plugins/post-smtp/Postman/Postman-Mail/libs/vendor_prefixed/google/apiclient-services/src/Gmail/MessagePartBody.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #10, #11, #12, #2, #3, #4, #5, #6, #7, #8, #9 in post-smtp/assets to your readme.txt
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can look at the official readme.txt

post-smtp/postman-smtp.php 85% from 13 tests

The entry point to "POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress" version 2.8.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 264 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("post-smtp.php" instead of "postman-smtp.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/post-smtp/Postman/Mobile/includes/phpqrcode/tools/merge.bat
131,981 lines of code in 988 files:
LanguageFilesBlank linesComment linesLines of code
PHP86217,33664,331118,156
JavaScript931,1281,7695,803
PO File73,1956,5864,467
CSS21521973,273
Markdown1680214
HTML12037
JSON10027
Bourne Shell1002
DOS Batch1002

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity17.85
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces67
Interfaces53
Traits11
Classes754
▷ Abstract classes9813.00%
▷ Concrete classes65687.00%
▷ Final classes395.95%
Methods6,722
▷ Static methods1,07415.98%
▷ Public methods5,33279.32%
▷ Protected methods5347.94%
▷ Private methods85612.73%
Functions371
▷ Named functions23262.53%
▷ Anonymous functions13937.47%
Constants1,025
▷ Global constants25224.59%
▷ Class constants77375.41%
▷ Public constants773100.00%

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
97 PNG files occupy 0.43MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Postman/Wizard/assets/images/mandrill.png2.35KB1.37KB▼ 41.79%
Postman/Mobile/includes/phpqrcode/cache/frame_15.png0.21KB0.20KB▼ 4.57%
Postman/Wizard/assets/images/gmail.png1.03KB0.73KB▼ 29.04%
Postman/Mobile/includes/phpqrcode/cache/frame_13.png0.21KB0.19KB▼ 5.24%
Postman/Mobile/includes/phpqrcode/cache/frame_32.png0.26KB0.25KB▼ 4.20%