68% smtp-for-wp

Code Review | SMTP for WP

WordPress plugin SMTP for WP scored68%from 54 tests.

About plugin

  • Plugin page: smtp-for-wp
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 3
  • Update frequency: every 141.7 days
  • Top authors: sidngr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /155 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
Installer ran successfully

Server metrics [RAM: ▼0.16MB] [CPU: ▼10.63ms] Passed 4 tests

A check of server-side resources used by SMTP for WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.96 ▼0.42
Dashboard /wp-admin3.14 ▼0.1736.17 ▼10.65
Posts /wp-admin/edit.php3.28 ▼0.0837.77 ▼10.88
Add New Post /wp-admin/post-new.php5.52 ▼0.3772.74 ▼17.86
Media Library /wp-admin/upload.php3.23 ▼0.0132.18 ▼3.13
Setting /wp-admin/admin.php?page=sn-ws-setting3.2935.84
Test Email /wp-admin/admin.php?page=sn-ws-test-email3.2837.85

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SMTP for WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7314.13 ▼0.231.86 ▲0.1643.74 ▲4.42
Dashboard /wp-admin2,243 ▲655.66 ▲0.0487.62 ▼32.1839.19 ▼4.28
Posts /wp-admin/edit.php2,148 ▲482.07 ▲0.1136.51 ▼1.5035.80 ▲1.46
Add New Post /wp-admin/post-new.php1,554 ▲2823.18 ▲0.10632.10 ▲17.0851.97 ▼4.28
Media Library /wp-admin/upload.php1,442 ▲394.31 ▲0.16101.38 ▼4.1044.97 ▼0.57
Setting /wp-admin/admin.php?page=sn-ws-setting1,0342.0342.0548.38
Test Email /wp-admin/admin.php?page=sn-ws-test-email8871.8530.3830.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method SN_WS_INIT::uninstall_plugin_data() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sn-ws-test-email
    • > Notice in wp-content/plugins/smtp-for-wp/includes/class.sn-ws-init.php+160
    Undefined index: sn_ws_message
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sn-ws-test-email
    • > Notice in wp-content/plugins/smtp-for-wp/includes/class.sn-ws-init.php+160
    Trying to access array offset on value of type null

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SN_WS_INIT' not found in wp-content/plugins/smtp-for-wp/templates/navigation.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: mailer, email, smtp

smtp-for-wp/init.php 92% from 13 tests

The primary PHP file in "SMTP for WP" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("smtp-for-wp.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,629 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4132245927
PHP997206383
CSS21214319

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.33
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods417.39%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
There were not PNG files found in your plugin