74% wp-smtp

Code Review | WP SMTP

WordPress plugin WP SMTP scored74%from 54 tests.

About plugin

  • Plugin page: wp-smtp
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 10, 2012
  • Latest release: Oct 17, 2023
  • Number of updates: 57
  • Update frequency: every 70.1 days
  • Top authors: acalbert (49.12%)yehudah (40.35%)raldea89 (10.53%)Jack Kitterhing (3.51%)altesin (3.51%)

Code review

54 tests

User reviews

45 reviews

Install metrics

70,000+ active /690,961 total downloads

Benchmarks

Plugin footprint 65% 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.03MB] [CPU: ▼4.02ms] Passed 4 tests

A check of server-side resources used by WP SMTP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.84 ▲1.09
Dashboard /wp-admin3.34 ▲0.0345.19 ▼6.52
Posts /wp-admin/edit.php3.39 ▲0.0343.77 ▼1.62
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.26 ▼9.02
Media Library /wp-admin/upload.php3.26 ▲0.0335.42 ▲4.88
Mail Logs /wp-admin/admin.php?page=wpsmtp_logs3.2330.27
WP SMTP /wp-admin/admin.php?page=wp-smtp/wp-smtp.php3.3130.38

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: 1 new table, 7 new options
New tables
wp_wpsmtp_logs
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
wp_smtp_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP SMTP: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.35 ▲0.001.75 ▲0.1639.03 ▲0.17
Dashboard /wp-admin2,225 ▲445.61 ▼0.1282.19 ▼18.6338.11 ▼3.31
Posts /wp-admin/edit.php2,127 ▲302.01 ▲0.0634.54 ▼1.5733.83 ▼2.31
Add New Post /wp-admin/post-new.php1,557 ▲2918.30 ▼4.49600.46 ▲6.3677.57 ▲30.57
Media Library /wp-admin/upload.php1,421 ▲244.21 ▼0.0296.30 ▼2.9645.54 ▲0.36
Mail Logs /wp-admin/admin.php?page=wpsmtp_logs1,1563.3257.8233.06
WP SMTP /wp-admin/admin.php?page=wp-smtp/wp-smtp.php1,0592.0224.1333.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_wpsmtp_logs
  • Zombie WordPress options detected upon uninstall: 7 options
    • wp_smtp_options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpsmtp_logs
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=wpsmtp_logs
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

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

This is the main PHP file of "WP SMTP" version 1.2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
105 characters long description:
WP SMTP can help us to send emails via SMTP instead of the PHP mail() function and email logger built-in.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,563 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP142512151,114
JavaScript52537363
PO File1232261
CSS24018
JSON1007

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.22
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods60
▷ Static methods711.67%
▷ Public methods5896.67%
▷ Protected methods00.00%
▷ Private methods23.33%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/gmail.png0.68KB0.83KB0.00%
assets/images/details_open.png0.69KB0.80KB0.00%
img/sort_asc.png0.16KB0.25KB0.00%
img/163.png0.19KB0.13KB▼ 32.82%
img/sort_both.png0.20KB0.29KB0.00%