79% wp-users-login-history

Code Review | WP Users Login History

WordPress plugin WP Users Login History scored79%from 54 tests.

About plugin

  • Plugin page: wp-users-login-hi...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 5, 2019
  • Latest release: Jun 15, 2023
  • Number of updates: 6
  • Update frequency: every 229.8 days
  • Top authors: thechetanvaghela (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /792 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 gracefully, with no errors

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

A check of server-side resources used by WP Users Login History
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.14 ▼6.59
Dashboard /wp-admin3.43 ▲0.0847.71 ▼9.11
Posts /wp-admin/edit.php3.54 ▲0.1844.33 ▲3.89
Add New Post /wp-admin/post-new.php6.03 ▲0.1479.55 ▼21.61
Media Library /wp-admin/upload.php3.35 ▲0.1233.06 ▲1.48

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Users Login History
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲9313.44 ▼0.948.29 ▲6.3544.53 ▲1.74
Dashboard /wp-admin2,205 ▲255.67 ▲0.0597.58 ▲10.8443.29 ▲5.01
Posts /wp-admin/edit.php2,107 ▲42.02 ▲0.0133.50 ▼6.9435.08 ▼1.51
Add New Post /wp-admin/post-new.php1,542 ▲1622.88 ▼0.67686.06 ▲88.0861.59 ▲0.92
Media Library /wp-admin/upload.php1,404 ▲74.16 ▼0.0399.92 ▲0.1244.58 ▲2.68

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-users-login-history/admin/partials/wp-users-login-history-admin-display.php
    • > /wp-content/plugins/wp-users-login-history/public/partials/wp-users-login-history-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/wp-users-login-history/admin/partials/wpulh-popup-html.php:2

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: user detail, last login, mantain login history, user log, login history...

wp-users-login-history/wp-users-login-history.php Passed 13 tests

The main file in "WP Users Login History" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected810 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13187772497
CSS23116228
JavaScript2123685

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.86
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin