10% login-watchdog

Code Review | Login Watchdog

WordPress plugin Login Watchdog scored10%from 54 tests.

About plugin

  • Plugin page: login-watchdog
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.8
  • WordPress version: 6.3.1
  • First release: Aug 14, 2016
  • Latest release: Jun 10, 2017
  • Number of updates: 26
  • Update frequency: every 13.3 days
  • Top authors: JkmAS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,347 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
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼1.88MB] [CPU: ▼53.28ms] Passed 4 tests

A check of server-side resources used by Login Watchdog
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.12 ▼1.18
Dashboard /wp-admin2.07 ▼1.2710.21 ▼54.67
Posts /wp-admin/edit.php2.07 ▼1.289.44 ▼42.73
Add New Post /wp-admin/post-new.php2.07 ▼3.8210.50 ▼88.20
Media Library /wp-admin/upload.php2.07 ▼1.168.46 ▼27.50
Login Watchdog /wp-admin/options-general.php?page=login-watchdog2.078.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
watchdog_blocked_ip
New WordPress options
db_upgraded
widget_theysaidso_widget
WATCHDOG_LOGIN_VERSION
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Login Watchdog
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.23 ▲0.091.81 ▼0.1843.87 ▼1.14
Dashboard /wp-admin2,202 ▲225.62 ▲0.0592.58 ▼1.4243.10 ▲2.29
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0240.25 ▲3.0436.59 ▲2.31
Add New Post /wp-admin/post-new.php1,529 ▲123.69 ▲0.74651.06 ▲2.8854.94 ▼0.62
Media Library /wp-admin/upload.php1,407 ▲134.15 ▼0.07110.13 ▼1.2642.85 ▼3.33
Login Watchdog /wp-admin/options-general.php?page=login-watchdog8582.0125.4431.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • 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
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=login-watchdog
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/options-general.php?page=login-watchdog
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/login-watchdog/login-watchdog.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Login Watchdog admin page) image missing
You can take inspiration from this readme.txt

login-watchdog/login-watchdog.php 92% from 13 tests

"Login Watchdog" version 1.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 265 characters long)

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
There were no executable files found in this plugin704 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8106320532
PO File14142125
JavaScript163347

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.86
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods728.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/MacOS.png0.79KB0.73KB▼ 6.94%
admin/assets/img/iPod.png0.66KB0.59KB▼ 9.54%
screenshot-1.png29.06KB11.75KB▼ 59.57%
admin/assets/img/iPhone.png0.33KB0.34KB0.00%
admin/assets/img/refresh.png0.75KB0.73KB▼ 2.09%