84% admin-login-monitor

Code Review | Admin Login Monitor

WordPress plugin Admin Login Monitor scored84%from 54 tests.

About plugin

  • Plugin page: admin-login-monitor
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 31, 2022
  • Latest release: Jul 31, 2022
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: jackfischer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,067 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.36ms] Passed 4 tests

Server-side resources used by Admin Login Monitor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.18 ▼4.98
Dashboard /wp-admin3.32 ▲0.0247.82 ▼5.98
Posts /wp-admin/edit.php3.37 ▲0.0247.40 ▲0.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.56 ▼16.93
Media Library /wp-admin/upload.php3.25 ▲0.0235.69 ▼5.53

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Login Monitor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.351.92 ▼0.1138.35 ▼4.74
Dashboard /wp-admin2,192 ▲155.57 ▼0.0197.53 ▲2.8342.95 ▲0.09
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0740.67 ▲3.0636.78 ▼0.44
Add New Post /wp-admin/post-new.php1,535 ▼218.22 ▼0.14644.25 ▲23.3080.54 ▲13.80
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0498.20 ▼8.3243.25 ▼2.31

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

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

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-login-monitor/admin-login-monitor.php:83

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
3 plugin tags: alerts, security, monitoring

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

The main PHP script in "Admin Login Monitor" version 1.2.0 is automatically included on every request by WordPress
48 characters long description:
Automatically email warning for new admin logins

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
No dangerous file extensions were detected56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1181156

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity4.00
▷ Minimum method complexity3.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods150.00%
▷ Protected methods00.00%
▷ Private methods150.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin