94% adaptive-login-action

Code Review | Adaptive Login Action

WordPress plugin Adaptive Login Action scored 94% from 54 tests.

About plugin

  • Plugin page: adaptive-login-ac...
  • Plugin version: 1.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9
  • WordPress version: 5.9.2
  • First release: May 29, 2021
  • Latest release: Feb 16, 2022
  • Number of updates: 6
  • Update frequency: every 44.0 days
  • Top authors: wpgear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 245 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Adaptive Login Action
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0459.72 ▲11.30
Dashboard /wp-admin3.45 ▲0.0432.95 ▼1.32
Posts /wp-admin/edit.php3.67 ▲0.0337.53 ▼0.97
Add New Post /wp-admin/post-new.php6.91 ▼0.0692.91 ▼1,177.72
Media Library /wp-admin/upload.php3.32 ▲0.0325.13 ▲1.19
Adaptive Login Action /wp-admin/options-general.php?page=adaptive-login-action/options.php3.3125.52

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 3 new options
New WordPress options
adaptive-login-action_option_whitelist_ip
adaptive-login-action_last_ok
adaptive-login-action_ip_127.0.0.1

Browser metrics Passed 4 tests

An overview of browser requirements for Adaptive Login Action
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,792 ▲3915.98 ▼0.117.18 ▲0.962.50 ▼0.41
Dashboard /wp-admin2,883 ▲226.02 ▼0.14115.55 ▼16.96154.76 ▼12.40
Posts /wp-admin/edit.php2,690 ▼13.24 ▲0.0063.27 ▼1.75142.10 ▼4.43
Add New Post /wp-admin/post-new.php1,761 ▲10021.90 ▲6.32432.89 ▲26.48157.26 ▲2.83
Media Library /wp-admin/upload.php1,703 ▲55.52 ▼0.01141.81 ▲7.95189.68 ▲11.55
Adaptive Login Action /wp-admin/options-general.php?page=adaptive-login-action/options.php1,0672.4056.19100.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/adaptive-login-action/adaptive-login-action.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/adaptive-login-action/options.php:48

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

adaptive-login-action/adaptive-login-action.php Passed 13 tests

The main PHP script in "Adaptive Login Action" version 1.4 is automatically included on every request by WordPress
40 characters long description:
Compromise between Comfort and Paranoia.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected327 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47349288
CSS22839

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin