90% login-monitor

Code Review | Login Monitor

WordPress plugin Login Monitor scored 90% from 54 tests.

About plugin

  • Plugin page: login-monitor
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1.24+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: Jul 17, 2019
  • Number of updates: 14
  • Update frequency: every 16.9 days
  • Top authors: pressmaninc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 773 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.98ms] Passed 4 tests

This is a short check of server-side resources used by Login Monitor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.58 ▼1.62
Dashboard /wp-admin3.34 ▲0.0346.13 ▼3.87
Posts /wp-admin/edit.php3.39 ▲0.0344.02 ▼2.38
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.77 ▼12.06
Media Library /wp-admin/upload.php3.26 ▲0.0335.67 ▲0.55

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
login-monitor_version
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Login Monitor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲12913.29 ▼1.095.63 ▲3.8743.04 ▼2.33
Dashboard /wp-admin2,238 ▲465.84 ▲0.92105.29 ▼4.9541.74 ▲3.00
Posts /wp-admin/edit.php2,127 ▲382.01 ▼0.0140.77 ▲2.0933.39 ▲1.60
Add New Post /wp-admin/post-new.php1,553 ▲2023.35 ▲0.25605.69 ▼3.8659.92 ▲2.94
Media Library /wp-admin/upload.php1,423 ▲324.16 ▼0.13103.16 ▲2.1042.12 ▼2.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: login, user, pressman, users

login-monitor/login-monitor.php Passed 13 tests

The principal PHP file in "Login Monitor" v. 1.0.3 is loaded by WordPress automatically on each request
72 characters long description:
Displays current logged in users in administration screens in real time.

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
Success! There were no dangerous files found in this plugin248 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP1231787
JavaScript211060
Sass16040
CSS26037
PO File15724

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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 constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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