68% login-location-notifier

Code Review | Login Location Notifier

WordPress plugin Login Location Notifier scored68%from 54 tests.

About plugin

  • Plugin page: login-location-no...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Jun 6, 2016
  • Latest release: Jun 6, 2016
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: mangesh.kode87 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,048 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.87MB] [CPU: ▼59.68ms] Passed 4 tests

An overview of server-side resources used by Login Location Notifier
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.24 ▼38.59
Dashboard /wp-admin2.15 ▼1.208.03 ▼58.45
Posts /wp-admin/edit.php2.15 ▼1.216.26 ▼44.50
Add New Post /wp-admin/post-new.php2.15 ▼3.746.26 ▼97.18
Media Library /wp-admin/upload.php2.15 ▼1.086.74 ▼30.44

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login Location Notifier
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7714.29 ▼0.312.00 ▲0.2539.44 ▲0.99
Dashboard /wp-admin2,220 ▲435.69 ▲0.1587.24 ▲0.5340.70 ▼0.59
Posts /wp-admin/edit.php2,122 ▲222.04 ▲0.0736.49 ▼3.1843.13 ▲1.72
Add New Post /wp-admin/post-new.php1,545 ▲1923.03 ▲0.24661.32 ▲43.3555.76 ▲8.56
Media Library /wp-admin/upload.php1,425 ▲284.30 ▲0.0995.99 ▼10.3746.28 ▲0.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the login-notification-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/login-location-notifier/login_location_notifier.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/login-location-notifier/views/login-location-notifier.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: login location notifier, login notification, location notifier, login notifier, login location notification...

login-location-notifier/login_location_notifier.php 92% from 13 tests

The main file in "Login Location Notifier" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("login-location-notifier.php" instead of "login_location_notifier.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,449 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22221611,161
PHP3219279
CSS1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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