83% nutsforpress-smtp-mail

Code Review | NutsForPress SMTP Mail

WordPress plugin NutsForPress SMTP Mail scored83%from 54 tests.

About plugin

  • Plugin page: nutsforpress-smtp...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 8, 2021
  • Latest release: Aug 4, 2023
  • Number of updates: 18
  • Update frequency: every 52.2 days
  • Top authors: Christian Gatti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,332 total downloads

Benchmarks

Plugin footprint 83% 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.12MB] [CPU: ▼5.17ms] Passed 4 tests

This is a short check of server-side resources used by NutsForPress SMTP Mail
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1338.23 ▼2.77
Dashboard /wp-admin3.43 ▲0.0948.12 ▼15.38
Posts /wp-admin/edit.php3.55 ▲0.1947.67 ▲0.55
Add New Post /wp-admin/post-new.php6.03 ▲0.1496.38 ▼3.08
Media Library /wp-admin/upload.php3.36 ▲0.1240.23 ▲8.17
NutsForPress /wp-admin/admin.php?page=nfproot-settings3.3234.19
SMTP Mail /wp-admin/admin.php?page=nfpsmt-settings3.3936.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for NutsForPress SMTP Mail
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12013.57 ▼0.991.86 ▼0.0241.46 ▼2.63
Dashboard /wp-admin2,250 ▲984.86 ▼0.81104.70 ▼2.6739.79 ▼2.85
Posts /wp-admin/edit.php2,133 ▲442.08 ▲0.0642.59 ▲6.1537.05 ▼1.31
Add New Post /wp-admin/post-new.php1,550 ▲1723.02 ▼0.15601.18 ▼75.9359.96 ▲10.54
Media Library /wp-admin/upload.php1,429 ▲414.34 ▲0.1098.08 ▼2.2142.35 ▼2.89
NutsForPress /wp-admin/admin.php?page=nfproot-settings8322.1024.8327.78
SMTP Mail /wp-admin/admin.php?page=nfpsmt-settings1,0892.1425.6525.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 14× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/nutsforpress-smtp-mail/root/nfproot-settings-structure.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/includes/nfpsmt-plugin-uninstall.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/admin/nfpsmt-settings.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/root/nfproot-saved-settings.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/includes/nfpsmt-plugin-activate.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/admin/nfpsmt-settings-content.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/includes/nfpsmt-styles-and-scripts.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/includes/nfpsmt-plugin-deactivate.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/admin/includes/nfpsmt-smtp-mail.php
    • > /wp-content/plugins/nutsforpress-smtp-mail/root/nfproot-save-settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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:
  • Requires php: Invalid plugin version format
The official readme.txt is a good inspiration

nutsforpress-smtp-mail/nuts-for-press-smtp-mail.php 85% from 13 tests

Analyzing the main PHP file in "NutsForPress SMTP Mail" version 1.5
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nutsforpress-smtp-mail.php" instead of "nuts-for-press-smtp-mail.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,485 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP148221581,185
JavaScript312055188
CSS1291112

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin