84% block-wp-login

Code Review | Block wp-login

WordPress plugin Block wp-login scored84%from 54 tests.

About plugin

  • Plugin page: block-wp-login
  • Plugin version: 1.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Oct 30, 2023
  • Number of updates: 75
  • Update frequency: every 32.0 days
  • Top authors: domainsupport (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

700+ active /15,320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼5.45ms] Passed 4 tests

This is a short check of server-side resources used by Block wp-login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1937.19 ▼3.42
Dashboard /wp-admin3.51 ▲0.2045.50 ▼7.05
Posts /wp-admin/edit.php3.62 ▲0.2642.73 ▼3.55
Add New Post /wp-admin/post-new.php6.09 ▲0.2090.04 ▼7.78
Media Library /wp-admin/upload.php3.43 ▲0.2035.25 ▼1.05

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Block wp-login
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.72 ▲0.111.84 ▲0.1954.00 ▲10.64
Dashboard /wp-admin2,204 ▲245.64 ▼0.0293.83 ▼6.9544.58 ▲2.70
Posts /wp-admin/edit.php2,110 ▲102.03 ▲0.0140.22 ▼0.2938.90 ▲2.72
Add New Post /wp-admin/post-new.php1,543 ▲1518.24 ▼4.82614.18 ▼91.6974.04 ▲15.25
Media Library /wp-admin/upload.php1,412 ▲124.20 ▼0.0598.75 ▼6.1541.92 ▼3.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • bwpl_slug
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/block-wp-login/block-wp-login.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: security, block hackers, security plugin, login security, secure

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

"Block wp-login" version 1.5.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
87 characters long description:
This plugin completely blocks access to wp-login.php and creates a new secret login URL

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin843 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP257716831
JavaScript15312

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity68.00
▷ Minimum class complexity6.00
▷ Maximum class complexity113.00
Average method complexity5.47
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods2760.00%
▷ Public methods4395.56%
▷ Protected methods00.00%
▷ Private methods24.44%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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