90% wp-user-login-notifier

Code Review | WordPress User Login Notifier

WordPress plugin WordPress User Login Notifier scored90%from 54 tests.

About plugin

  • Plugin page: wp-user-login-not...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 20, 2015
  • Latest release: Apr 10, 2023
  • Number of updates: 15
  • Update frequency: every 192.1 days
  • Top authors: sbrajesh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /18,827 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.13MB] [CPU: ▼1.39ms] Passed 4 tests

Analyzing server-side resources used by WordPress User Login Notifier
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0250.66 ▲4.53
Dashboard /wp-admin3.52 ▲0.2253.79 ▼2.99
Posts /wp-admin/edit.php3.58 ▲0.2261.33 ▲3.13
Add New Post /wp-admin/post-new.php6.04 ▲0.1599.86 ▼5.69
Media Library /wp-admin/upload.php3.36 ▲0.1442.02 ▲0.01
WP User Login Notifier /wp-admin/options-general.php?page=wp-user-login-notifier3.3641.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress User Login Notifier
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲19614.50 ▲0.222.38 ▲0.3745.07 ▼1.00
Dashboard /wp-admin2,338 ▲1646.21 ▲0.63116.33 ▲14.9439.67 ▼6.43
Posts /wp-admin/edit.php2,266 ▲1633.42 ▲1.4753.18 ▲14.1636.13 ▼3.34
Add New Post /wp-admin/post-new.php1,531 ▼323.37 ▲5.29637.84 ▼23.9836.48 ▼26.16
Media Library /wp-admin/upload.php1,406 ▲64.12 ▼0.0378.45 ▼23.8143.74 ▲0.25
WP User Login Notifier /wp-admin/options-general.php?page=wp-user-login-notifier1,0803.3544.1124.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: login, failed login, login notification, admin notification, email login notification...

wp-user-login-notifier/wp-user-login-notifier.php Passed 13 tests

This is the main PHP file of "WordPress User Login Notifier" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
57 characters long description:
Notify User/Admin when a users logs in or fails to log in

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,221 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP195211,1542,052
PO File12426115
JavaScript1141640
Markdown16014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.93
▷ Minimum class complexity1.00
▷ Maximum class complexity163.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods162
▷ Static methods53.09%
▷ Public methods11269.14%
▷ Protected methods4527.78%
▷ Private methods53.09%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants57
▷ Global constants11.75%
▷ Class constants5698.25%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin