78% smtp-mailer-wp

Code Review | SMTP MAILER WP

WordPress plugin SMTP MAILER WP scored78%from 54 tests.

About plugin

  • Plugin page: smtp-mailer-wp
  • Plugin version: 1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Apr 1, 2020
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: krut1 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10+ active /1,009 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.79ms] Passed 4 tests

A check of server-side resources used by SMTP MAILER WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0335.07 ▼5.63
Dashboard /wp-admin3.32 ▲0.0248.13 ▲1.23
Posts /wp-admin/edit.php3.37 ▲0.0246.35 ▼2.08
Add New Post /wp-admin/post-new.php5.90 ▲0.02119.37 ▲27.74
Media Library /wp-admin/upload.php3.24 ▲0.0236.63 ▲3.32

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

SMTP MAILER WP: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.57 ▼0.811.62 ▼0.1641.23 ▲1.15
Dashboard /wp-admin2,219 ▲275.82 ▲0.86137.22 ▲33.6150.90 ▲9.48
Posts /wp-admin/edit.php2,105 ▲162.07 ▲0.1050.85 ▲8.3447.44 ▲11.58
Add New Post /wp-admin/post-new.php1,546 ▲1823.00 ▼0.11683.15 ▲2.7451.81 ▼10.27
Media Library /wp-admin/upload.php1,407 ▲194.33 ▲0.14100.96 ▲1.7543.70 ▲0.22

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smtp-mailer-wp/templates/settings-page.php
    • > /wp-content/plugins/smtp-mailer-wp/templates/settings-tabs/smtp-settings.php
    • > /wp-content/plugins/smtp-mailer-wp/templates/settings-tabs/test-send-mail.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant KRUT1_SMTP_MAILER_WP_PATH - assumed 'KRUT1_SMTP_MAILER_WP_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/smtp-mailer-wp/includes/Plugin.php on line 60
    • > PHP Warning
      require_once(KRUT1_SMTP_MAILER_WP_PATHincludes/Autoloader.php): failed to open stream: No such file or directory in wp-content/plugins/smtp-mailer-wp/includes/Plugin.php on line 60
    • > PHP Fatal error
      require_once(): Failed opening required 'KRUT1_SMTP_MAILER_WP_PATHincludes/Autoloader.php' (include_path='.:/usr/share/php') in wp-content/plugins/smtp-mailer-wp/includes/Plugin.php on line 60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/smtp-mailer-wp/smtp-mailer-wp.php:16

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

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

"SMTP MAILER WP" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
Use your personal SMTP mail server (GMAIL, YAHOO etc.) to send emails in your WordPress system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected557 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12104204397
PO File27472160

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity4.43
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods1140.74%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/avatar-author.png10.86KB11.24KB0.00%