84% wp-easy-mail-smtp

Code Review | WP Easy Mail SMTP

WordPress plugin WP Easy Mail SMTP scored84%from 54 tests.

About plugin

  • Plugin page: wp-easy-mail-smtp
  • Plugin version: 2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Dec 2, 2019
  • Latest release: Apr 10, 2023
  • Number of updates: 14
  • Update frequency: every 88.9 days
  • Top authors: yudiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /688 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.91ms] Passed 4 tests

An overview of server-side resources used by WP Easy Mail SMTP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.51 ▲1.97
Dashboard /wp-admin3.32 ▲0.0144.85 ▼1.31
Posts /wp-admin/edit.php3.37 ▲0.0143.58 ▼4.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.97 ▼7.38
Media Library /wp-admin/upload.php3.24 ▲0.0136.63 ▲2.25

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Easy Mail SMTP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.28 ▼1.315.00 ▲2.9842.94 ▼0.29
Dashboard /wp-admin2,219 ▲285.87 ▲0.9596.85 ▼3.4843.45 ▼0.10
Posts /wp-admin/edit.php2,102 ▲132.02 ▲0.0435.36 ▼6.0933.99 ▼2.27
Add New Post /wp-admin/post-new.php1,528 ▲623.16 ▼0.02679.04 ▲0.7872.72 ▲13.14
Media Library /wp-admin/upload.php1,407 ▲254.21 ▲0.0597.94 ▲0.6242.44 ▼1.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'WEMS_MAIL_SMTP_DIRinit/easy-mail-smtp-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-easy-mail-smtp/admin/easy-mail-smtp-tab-email-test.php on line 2
    • > PHP Warning
      require_once(WEMS_MAIL_SMTP_DIRinit/easy-mail-smtp-functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-easy-mail-smtp/admin/easy-mail-smtp-tab-email-test.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-easy-mail-smtp/wp-easy-mail-smtp.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_verify_nonce() in wp-content/plugins/wp-easy-mail-smtp/admin/easy-mail-smtp-tab-settings.php:3
    • > PHP Warning
      Use of undefined constant WEMS_MAIL_SMTP_DIR - assumed 'WEMS_MAIL_SMTP_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-easy-mail-smtp/admin/easy-mail-smtp-tab-email-test.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-easy-mail-smtp/init/easy-mail-smtp-functions.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • License: Empty string
The official readme.txt is a good inspiration

wp-easy-mail-smtp/wp-easy-mail-smtp.php Passed 13 tests

"WP Easy Mail SMTP" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Make mail sending easy using SMTP in Wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected240 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4910217
CSS11016
JavaScript1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin