10% login-alert-notification

Code Review | Login Alert Notification

WordPress plugin Login Alert Notification scored10%from 54 tests.

About plugin

  • Plugin page: login-alert-notif...
  • Plugin version: 0.51
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 21, 2013
  • Latest release: Jun 18, 2013
  • Number of updates: 13
  • Update frequency: every 2.2 days
  • Top authors: hondamarlboro (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,210 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/login-alert-notification/class.nma.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; NotifyMyAndroid has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼57.45ms] Passed 4 tests

Server-side resources used by Login Alert Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.396.28 ▼38.09
Dashboard /wp-admin2.09 ▼1.219.98 ▼47.16
Posts /wp-admin/edit.php2.09 ▼1.268.04 ▼50.34
Add New Post /wp-admin/post-new.php2.09 ▼3.798.75 ▼94.19
Media Library /wp-admin/upload.php2.09 ▼1.137.40 ▼33.00
Login Alert Notification /wp-admin/options-general.php?page=login-alert-notification2.108.60

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login Alert Notification
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.231.69 ▼0.4242.28 ▲0.51
Dashboard /wp-admin2,202 ▲255.61 ▼0.0581.54 ▼9.7938.23 ▼3.15
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0446.12 ▲5.5540.97 ▲1.90
Add New Post /wp-admin/post-new.php1,529 ▲123.16 ▼0.03656.84 ▼1.2053.80 ▲0.59
Media Library /wp-admin/upload.php1,398 ▼24.15 ▼0.1297.57 ▼7.2044.84 ▼0.73
Login Alert Notification /wp-admin/options-general.php?page=login-alert-notification9492.0024.9731.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/login-alert-notification/class.nma.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; NotifyMyAndroid has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=login-alert-notification
    • > Deprecated in wp-content/plugins/login-alert-notification/class.nma.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; NotifyMyAndroid has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=login-alert-notification
    • > Notice in wp-content/plugins/login-alert-notification/login_alerts_notification_admin.php+71
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/login-alert-notification/login_alerts_notification_admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/login-alert-notification/login-alert-notification.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === login-alert-notification === )
  • Donate link: Invalid URI ("")
The official readme.txt might help

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

The entry point to "Login Alert Notification" version 0.51 is a PHP file that has certain tags in its header comment area
114 characters long description:
Notify alerts with Email and Push Notifiaction Services if someone has tried to login to your WordPress dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin608 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5163255608

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity20.33
▷ Minimum class complexity7.00
▷ Maximum class complexity34.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods3892.68%
▷ Protected methods00.00%
▷ Private methods37.32%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.65MB with 0.40MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png258.00KB136.99KB▼ 46.91%
screenshot-1.png411.46KB95.25KB▼ 76.85%