84% simple-smtp

Code Review | WordPress Simple SMTP

WordPress plugin WordPress Simple SMTP scored84%from 54 tests.

About plugin

  • Plugin page: simple-smtp
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 17, 2020
  • Latest release: Oct 13, 2023
  • Number of updates: 29
  • Update frequency: every 45.0 days
  • Top authors: soupbowl (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active /9,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.36MB] [CPU: ▼3.87ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Simple SMTP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1837.00 ▼10.70
Dashboard /wp-admin3.76 ▲0.4648.99 ▲2.55
Posts /wp-admin/edit.php3.81 ▲0.4645.94 ▼1.15
Add New Post /wp-admin/post-new.php6.28 ▲0.3982.49 ▼6.18
Media Library /wp-admin/upload.php3.62 ▲0.3937.10 ▲3.57
Mail /wp-admin/options-general.php?page=wpsimplesmtp3.6033.94

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Simple SMTP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.26 ▼0.081.67 ▼0.1544.45 ▼2.54
Dashboard /wp-admin2,201 ▲245.53 ▼0.1482.71 ▼14.8437.86 ▼4.23
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0235.32 ▼0.7231.83 ▼3.28
Add New Post /wp-admin/post-new.php1,530 ▲423.10 ▼0.12677.16 ▼19.6564.32 ▲4.04
Media Library /wp-admin/upload.php1,404 ▲104.19 ▼0.0094.71 ▼4.5547.17 ▲1.77
Mail /wp-admin/options-general.php?page=wpsimplesmtp1,0792.0024.6334.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-smtp/src/mail/class-maildisable.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-smtp/src/mail/class-maildisable.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'wpsimplesmtp\\Settings' not found in wp-content/plugins/simple-smtp/src/settings/class-multisite.php:17
    • > PHP Warning
      require_once(ABSPATHWPINC/PHPMailer/PHPMailer.php): failed to open stream: No such file or directory in wp-content/plugins/simple-smtp/src/mail/class-maildisable.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpsimplesmtp\\is_multisite() in wp-content/plugins/simple-smtp/src/class-options.php:48
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/PHPMailer/PHPMailer.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-smtp/src/mail/class-maildisable.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'wpsimplesmtp\\Settings' not found in wp-content/plugins/simple-smtp/src/settings/class-singular.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: dispatch, sender, smtp, email, mail

simple-smtp/wp-simple-smtp.php 92% from 13 tests

The primary PHP file in "WordPress Simple SMTP" version 1.3.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-smtp.php" instead of "wp-simple-smtp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,506 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP274761,3442,434
JavaScript1112366
JSON1005
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.81
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods144
▷ Static methods2215.28%
▷ Public methods13090.28%
▷ Protected methods00.00%
▷ Private methods149.72%
Functions26
▷ Named functions311.54%
▷ Anonymous functions2388.46%
Constants0
▷ Global constants00.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
No PNG files were detected