58% stars-smtp-mailer

Code Review | Stars SMTP Mailer

WordPress plugin Stars SMTP Mailer scored 58% from 54 tests.

About plugin

  • Plugin page: stars-smtp-mailer
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 18, 2018
  • Latest release: Jun 28, 2021
  • Number of updates: 17
  • Update frequency: every 69.1 days
  • Top authors: aditya.dugar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 934 total downloads

Benchmarks

Plugin footprint 48% 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: ▼1.22MB] [CPU: ▼38.45ms] Passed 4 tests

An overview of server-side resources used by Stars SMTP Mailer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7115.71 ▼24.07
Dashboard /wp-admin2.80 ▼0.5118.81 ▼31.44
Posts /wp-admin/edit.php2.80 ▼0.5619.46 ▼29.91
Add New Post /wp-admin/post-new.php2.80 ▼3.0917.40 ▼68.36
Media Library /wp-admin/upload.php2.80 ▼0.4318.64 ▼14.26
Email Log /wp-admin/admin.php?page=stars-smtpm-email-log2.8026.79
Add New Account /wp-admin/admin.php?page=stars-smtpm-new-account2.8017.45
SMTP Accounts /wp-admin/admin.php?page=stars-smtpm-accounts2.8020.12
Test Email /wp-admin/admin.php?page=stars-smtpm-test-mail2.8017.64

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 41 new files
Database: 2 new tables, 6 new options
New tables
wp_stars_smtp_settings
wp_stars_emails_log
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Stars SMTP Mailer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲10013.24 ▼1.251.69 ▼0.3939.67 ▼4.55
Dashboard /wp-admin2,314 ▲1084.86 ▲0.02108.59 ▲12.0342.10 ▲6.65
Posts /wp-admin/edit.php2,144 ▲552.05 ▲0.0442.84 ▲7.6637.12 ▲1.95
Add New Post /wp-admin/post-new.php1,558 ▲3917.95 ▼5.10642.64 ▼16.4950.89 ▼8.90
Media Library /wp-admin/upload.php1,444 ▲534.27 ▲0.08107.65 ▲7.8846.85 ▼1.17
Email Log /wp-admin/admin.php?page=stars-smtpm-email-log1,1822.2034.4328.17
Add New Account /wp-admin/admin.php?page=stars-smtpm-new-account1,1361.8328.5335.93
SMTP Accounts /wp-admin/admin.php?page=stars-smtpm-accounts1,1022.2032.3928.84
Test Email /wp-admin/admin.php?page=stars-smtpm-test-mail1,7136.18118.1376.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_stars_smtp_settings
    • wp_stars_emails_log
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stars-smtpm-test-mail
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stars-smtpm-test-mail
    • > User deprecated in wp-includes/functions.php+5643
    File class-smtp.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/SMTP.php instead. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
  • 44 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stars-smtpm-test-mail
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/stars-smtp-mailer/action/stars-class-table-layout.php

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Requires php: Invalid plugin version format
Please take inspiration from this readme.txt

stars-smtp-mailer/stars_smtp_mailer.php 85% from 13 tests

This is the main PHP file of "Stars SMTP Mailer" version 1.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 169 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("stars-smtp-mailer.php" instead of "stars_smtp_mailer.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
Success! There were no dangerous files found in this plugin2,396 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP7137461,451
CSS2652709
JavaScript203233
SVG3003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity72.00
▷ Minimum class complexity72.00
▷ Maximum class complexity72.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
24 PNG files occupy 0.25MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.37KB0.12KB▼ 66.04%
assets/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/css/images/ui-bg_flat_65_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
assets/css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
assets/css/images/ui-bg_highlight-hard_100_f6f6f6_1x100.png0.25KB0.11KB▼ 53.39%