94% admin-users-logged-in

Code Review | Admin Users Logged In

WordPress plugin Admin Users Logged In scored 94% from 54 tests.

About plugin

  • Plugin page: admin-users-logge...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.8.1
  • First release: Feb 5, 2018
  • Latest release: Jan 23, 2022
  • Number of updates: 24
  • Update frequency: every 60.4 days
  • Top authors: mpol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 966 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼157.08ms] Passed 4 tests

An overview of server-side resources used by Admin Users Logged In
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0127.25 ▲3.25
Dashboard /wp-admin3.08 ▲0.0138.79 ▼1.12
Posts /wp-admin/edit.php3.13 ▲0.0236.56 ▼0.60
Add New Post /wp-admin/post-new.php5.44 ▼0.0077.84 ▼627.93
Media Library /wp-admin/upload.php3.02 ▲0.0225.14 ▲1.33

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Admin Users Logged In: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲16215.59 ▼0.045.03 ▼0.0974.60 ▲1.14
Dashboard /wp-admin3,005 ▲1126.03 ▼0.15115.18 ▼15.26180.77 ▲3.95
Posts /wp-admin/edit.php2,737 ▼03.24 ▼0.0162.19 ▼0.98132.27 ▼4.49
Add New Post /wp-admin/post-new.php3,735 ▼818.18 ▼0.89449.37 ▲5.33158.99 ▲1.94
Media Library /wp-admin/upload.php1,755 ▲35.53 ▲0.04138.89 ▼6.88182.44 ▼4.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/admin-users-logged-in/admin-users-logged-in.php

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 96% from 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
3 plugin tags: last login, dashboard widget, admin users

admin-users-logged-in/admin-users-logged-in.php 92% from 13 tests

The principal PHP file in "Admin Users Logged In" v. 1.0.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin79 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1264479

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected