90% simple-login-notification

Code Review | Simple Login Notification

WordPress plugin Simple Login Notification scored90%from 54 tests.

About plugin

  • Plugin page: simple-login-noti...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Sep 8, 2022
  • Latest release: Oct 26, 2023
  • Number of updates: 8
  • Update frequency: every 51.8 days
  • Top authors: specialk (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /1,879 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.35ms] Passed 4 tests

Server-side resources used by Simple Login Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.10 ▲3.56
Dashboard /wp-admin3.44 ▲0.0945.48 ▼10.04
Posts /wp-admin/edit.php3.55 ▲0.1949.40 ▲1.24
Add New Post /wp-admin/post-new.php6.02 ▲0.1392.30 ▼9.95
Media Library /wp-admin/upload.php3.36 ▲0.1337.23 ▲1.37
Login Notification /wp-admin/options-general.php?page=simple-login-notification3.3333.91

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Login Notification
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.081.62 ▼0.0245.12 ▲5.42
Dashboard /wp-admin2,202 ▲225.56 ▼0.0286.40 ▼5.7338.77 ▼1.18
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0239.19 ▼4.9735.71 ▼0.61
Add New Post /wp-admin/post-new.php1,537 ▲318.50 ▲0.26629.92 ▲8.3760.68 ▼4.34
Media Library /wp-admin/upload.php1,401 ▼24.21 ▼0.0296.53 ▼2.3941.47 ▼1.77
Login Notification /wp-admin/options-general.php?page=simple-login-notification8992.0236.4537.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: email notify on admin login, login notification, admin login notification, email notification

simple-login-notification/simple-login-notification.php Passed 13 tests

Analyzing the main PHP file in "Simple Login Notification" version 1.6
62 characters long description:
Sends an email when any admin-level user logs in to your site.

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
Success! There were no dangerous files found in this plugin468 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP239743423
CSS115528
JavaScript13117

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin