84% monitor-login

Code Review | Monitor Login

WordPress plugin Monitor Login scored84%from 54 tests.

About plugin

  • Plugin page: monitor-login
  • Plugin version: 0.1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 7, 2022
  • Latest release: Aug 4, 2023
  • Number of updates: 19
  • Update frequency: every 15.8 days
  • Top authors: aixeiger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /690 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.16MB] [CPU: ▼5.16ms] Passed 4 tests

An overview of server-side resources used by Monitor Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.47 ▼2.99
Dashboard /wp-admin3.47 ▲0.1350.34 ▼8.90
Posts /wp-admin/edit.php3.58 ▲0.2355.39 ▲7.18
Add New Post /wp-admin/post-new.php6.05 ▲0.1687.19 ▼14.95
Media Library /wp-admin/upload.php3.39 ▲0.1639.20 ▲6.21
Monitor Login /wp-admin/options-general.php?page=monitor-login3.3631.95

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
monitorlogin_themes
widget_theysaidso_widget
monitorlogin_plugs
can_compress_scripts
monitorlogin_email
theysaidso_admin_options

Browser metrics Passed 4 tests

Monitor Login: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.68 ▼1.001.72 ▲0.1141.62 ▼2.54
Dashboard /wp-admin2,210 ▲224.84 ▼0.06109.33 ▲2.6741.94 ▲0.88
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0040.79 ▼0.4736.39 ▼0.02
Add New Post /wp-admin/post-new.php1,523 ▲423.47 ▲0.17661.95 ▲45.2858.26 ▲9.95
Media Library /wp-admin/upload.php1,392 ▲44.15 ▼0.0997.93 ▼2.8141.84 ▼1.15
Monitor Login /wp-admin/options-general.php?page=monitor-login8562.0624.8126.68

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 take a closer look at the following
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/FirefoxTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/EdgeTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/StaticTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/InternetExplorerTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/PalemoonTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/ChromeTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/UCBrowserTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/OperaTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/BraveTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/monitor-login/vendor/cbschuld/browser.php/tests/FirefoxMobileTest.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: plugins, login, email, themes, login notifications...

monitor-login/monitorlogin.php 92% from 13 tests

The main PHP file in "Monitor Login" ver. 0.1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("monitor-login.php" instead of "monitorlogin.php")

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
There were no executable files found in this plugin3,019 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP253599502,725
Markdown3490183
JSON20096
XML1008
YAML1507

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes1161.11%
Methods177
▷ Static methods1910.73%
▷ Public methods10257.63%
▷ Protected methods6838.42%
▷ Private methods73.95%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants93
▷ Global constants22.15%
▷ Class constants9197.85%
▷ Public constants91100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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