83% when-last-login-welcome-email-add-on

Code Review | When Last Login - Welcome Email

WordPress plugin When Last Login - Welcome Email scored 83% from 54 tests.

About plugin

  • Plugin page: when-last-login-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: May 31, 2017
  • Latest release: Jun 1, 2017
  • Number of updates: 6
  • Update frequency: every 11.7 days
  • Top authors: yoohooplugins (66.67%)andrewza (50%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.05ms] Passed 4 tests

This is a short check of server-side resources used by When Last Login - Welcome Email
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.51 ▼8.07
Dashboard /wp-admin3.35 ▲0.0446.25 ▼7.06
Posts /wp-admin/edit.php3.40 ▲0.0446.65 ▼1.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.55 ▼15.28
Media Library /wp-admin/upload.php3.27 ▲0.0437.89 ▲3.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
wll_we_settings
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

When Last Login - Welcome Email: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.184.75 ▲2.8741.52 ▲5.18
Dashboard /wp-admin2,206 ▲154.88 ▼1.05106.67 ▲2.5443.44 ▲2.59
Posts /wp-admin/edit.php2,089 ▼02.16 ▲0.1740.32 ▼1.2735.42 ▼0.30
Add New Post /wp-admin/post-new.php1,533 ▲1923.28 ▲5.59624.46 ▼37.3661.19 ▲12.64
Media Library /wp-admin/upload.php1,382 ▼64.15 ▼0.0795.32 ▼9.9241.77 ▲0.67

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • wll_we_settings
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/when-last-login-welcome-email-add-on/when-last-login-welcome-email-settings.php:2

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (When Last Login - Welcome Email settings page.), #2 (When Last Login - Welcome Email example of an email sent to your user.)
You can take inspiration from this readme.txt

when-last-login-welcome-email-add-on/when-last-login-welcome-email.php 85% from 13 tests

This is the main PHP file of "When Last Login - Welcome Email" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("when-last-login-welcome-email-add-on.php" instead of "when-last-login-welcome-email.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,431 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS120711,184
PHP39726185
HTML11135
JavaScript14027

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity17.50
▷ Minimum class complexity14.00
▷ Maximum class complexity21.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods433.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin