90% smtp-mailer

Code Review | SMTP Mailer

WordPress plugin SMTP Mailer scored90%from 54 tests.

About plugin

  • Plugin page: smtp-mailer
  • Plugin version: 1.1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2015
  • Latest release: Nov 6, 2023
  • Number of updates: 42
  • Update frequency: every 68.6 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

54 reviews

Install metrics

60,000+ active /753,811 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼0.82ms] Passed 4 tests

This is a short check of server-side resources used by SMTP Mailer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.49 ▼0.81
Dashboard /wp-admin3.43 ▲0.1349.11 ▼0.23
Posts /wp-admin/edit.php3.54 ▲0.1948.41 ▲5.03
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.21 ▼5.34
Media Library /wp-admin/upload.php3.35 ▲0.1236.08 ▲3.10
SMTP Mailer /wp-admin/options-general.php?page=smtp-mailer-settings3.3233.38

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SMTP Mailer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.29 ▲0.021.90 ▲0.4144.09 ▲4.73
Dashboard /wp-admin2,193 ▲125.49 ▼0.1184.58 ▼22.1838.05 ▼4.15
Posts /wp-admin/edit.php2,104 ▲41.97 ▲0.0038.74 ▼0.2434.76 ▼2.61
Add New Post /wp-admin/post-new.php1,538 ▲225.10 ▲1.92644.32 ▼45.9567.92 ▲9.94
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.0499.21 ▼1.7341.80 ▼4.03
SMTP Mailer /wp-admin/options-general.php?page=smtp-mailer-settings9982.1222.8630.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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)
There were no browser issues found

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
4 plugin tags: email, mail, smtp, phpmailer

smtp-mailer/main.php 92% from 13 tests

"SMTP Mailer" version 1.1.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("smtp-mailer.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected667 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1107125667

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity5.42
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected