94% bp-block-users

Code Review | BP Block Users

WordPress plugin BP Block Users scored 94% from 54 tests.

About plugin

  • Plugin page: bp-block-users
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.1
  • WordPress version: 5.8.1
  • First release: Sep 23, 2015
  • Latest release: Jan 15, 2018
  • Number of updates: 10
  • Update frequency: every 84.5 days
  • Top authors: thebrandonallen (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 5,059 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by BP Block Users
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0142.31 ▲5.18
Dashboard /wp-admin3.07 ▲0.0151.15 ▼0.09
Posts /wp-admin/edit.php3.13 ▲0.0144.81 ▼1.56
Add New Post /wp-admin/post-new.php5.43 ▼0.0192.74 ▼568.78
Media Library /wp-admin/upload.php3.02 ▲0.0135.31 ▲1.23

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by BP Block Users
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.81 ▲0.238.38 ▼0.7448.12 ▲3.29
Dashboard /wp-admin2,973 ▲425.89 ▼0.01147.76 ▼6.68118.24 ▼1.53
Posts /wp-admin/edit.php2,736 ▼02.68 ▲0.0072.05 ▲7.9196.54 ▲4.07
Add New Post /wp-admin/post-new.php1,498 ▼8318.84 ▲4.44390.23 ▼1.87117.01 ▼0.86
Media Library /wp-admin/upload.php1,807 ▲745.02 ▲0.00153.06 ▼8.88123.62 ▼1.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bp-block-users/templates/buddypress/members/single/settings/block-user.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: buddypress, block, bp, block users, users

bp-block-users/bp-block-users.php Passed 13 tests

"BP Block Users" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
Allows BuddyPress administrators to block users indefinitely, or for a specified period of time.

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 plugin1,646 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP145631,7401,585
Markdown135061

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity17.33
▷ Minimum class complexity4.00
▷ Maximum class complexity33.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods84
▷ Static methods1619.05%
▷ Public methods5565.48%
▷ Protected methods2125.00%
▷ Private methods89.52%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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