84% block-user-account

Code Review | DW Block User Account

WordPress plugin DW Block User Account scored84%from 54 tests.

About plugin

  • Plugin page: block-user-account
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: May 19, 2023
  • Number of updates: 37
  • Update frequency: every 57.4 days
  • Top authors: zooroofchi (86.49%)dangoweb (16.22%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /4,527 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.34ms] Passed 4 tests

Server-side resources used by DW Block User Account
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.80 ▼4.87
Dashboard /wp-admin3.35 ▲0.0444.51 ▼4.95
Posts /wp-admin/edit.php3.40 ▲0.0447.69 ▼1.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.65 ▼6.47
Media Library /wp-admin/upload.php3.27 ▲0.0436.04 ▲3.35

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by DW Block User Account
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.28 ▼1.102.00 ▲0.0640.07 ▼5.62
Dashboard /wp-admin2,206 ▲155.85 ▼0.05109.02 ▲9.5840.51 ▲0.06
Posts /wp-admin/edit.php2,089 ▼02.12 ▲0.1138.82 ▼5.2834.59 ▼1.55
Add New Post /wp-admin/post-new.php1,533 ▲523.08 ▲4.69588.33 ▼43.5256.67 ▲3.95
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0794.87 ▼0.5341.44 ▼1.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-user-account/block-user-account.php:12

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

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: block user, disable account, block account

block-user-account/block-user-account.php Passed 13 tests

The principal PHP file in "DW Block User Account" v. 1.3.1 is loaded by WordPress automatically on each request
34 characters long description:
Block Users Accounts On your Site.

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 plugin362 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12017184
CSS100113
PO File1233065

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected