84% htaccess-login-block

Code Review | .htaccess Login block

WordPress plugin .htaccess Login block scored 84% from 54 tests.

About plugin

  • Plugin page: htaccess-login-block
  • Plugin version: 0.98
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.9
  • WordPress version: 6.3.1
  • First release: Jan 22, 2017
  • Latest release: Jan 30, 2022
  • Number of updates: 24
  • Update frequency: every 76.4 days
  • Top authors: anton.aleksandrov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 4,907 total downloads

Benchmarks

Plugin footprint 82% 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.09MB] [CPU: ▲0.32ms] Passed 4 tests

Server-side resources used by .htaccess Login block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0654.17 ▲11.32
Dashboard /wp-admin3.41 ▲0.1055.97 ▲3.21
Posts /wp-admin/edit.php3.52 ▲0.1655.32 ▲3.67
Add New Post /wp-admin/post-new.php5.99 ▲0.1096.52 ▼4.53
Media Library /wp-admin/upload.php3.33 ▲0.1039.84 ▼1.05
.htaccess login block /wp-admin/options-general.php?page=htaccess_login_block3.2941.73

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • There were 1 file (0.82KB) illegally modified outside of "wp-content/plugins/htaccess-login-block/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 5 new files
Database: 2 new tables, 6 new options
New tables
wp_slbl_log
wp_slbl_blocks
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for .htaccess Login block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲413.30 ▼1.105.60 ▲3.8944.62 ▼0.24
Dashboard /wp-admin2,204 ▼25.84 ▼0.01107.26 ▼9.2139.75 ▼8.09
Posts /wp-admin/edit.php2,096 ▲81.97 ▼0.0840.40 ▲2.3535.42 ▼2.06
Add New Post /wp-admin/post-new.php1,542 ▲2823.37 ▲5.86676.30 ▼16.8359.24 ▲6.41
Media Library /wp-admin/upload.php1,392 ▲14.18 ▼0.0496.01 ▼15.2041.09 ▼8.23
.htaccess login block /wp-admin/options-general.php?page=htaccess_login_block1,0092.1525.8529.06

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 detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/htaccess-login-block/htaccess-login-block.php
    • > /wp-content/plugins/htaccess-login-block/class.htaccess_login_block.php
    • > /wp-content/plugins/htaccess-login-block/class.htaccess_login_block.admin.php
    • > /wp-content/plugins/htaccess-login-block/class.htaccess_login_block.base.php

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === htaccess-login-block === )
The official readme.txt is a good inspiration

htaccess-login-block/htaccess-login-block.php Passed 13 tests

The main PHP script in ".htaccess Login block" version 0.98 is automatically included on every request by WordPress
78 characters long description:
Simple and fast security plugin to block login hijackers using .htaccess file.

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
Success! There were no dangerous files found in this plugin578 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP419937578

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity35.33
▷ Minimum class complexity24.00
▷ Maximum class complexity48.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods29100.00%
▷ Public methods2793.10%
▷ Protected methods00.00%
▷ Private methods26.90%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin