74% bp-toolkit

Code Review | Block, Suspend, Report for BuddyPress

WordPress plugin Block, Suspend, Report for BuddyPress scored74%from 54 tests.

About plugin

  • Plugin page: bp-toolkit
  • Plugin version: 3.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Apr 4, 2019
  • Latest release: Jul 5, 2023
  • Number of updates: 46
  • Update frequency: every 33.8 days
  • Top authors: bouncingsprout (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /38,653 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▼1.88ms] Passed 4 tests

A check of server-side resources used by Block, Suspend, Report for BuddyPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5938.89 ▼2.13
Dashboard /wp-admin3.89 ▲0.5848.11 ▼0.31
Posts /wp-admin/edit.php3.94 ▲0.5847.10 ▲1.73
Add New Post /wp-admin/post-new.php6.40 ▲0.5283.56 ▼6.79
Media Library /wp-admin/upload.php3.65 ▲0.4240.72 ▲3.89
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0038.74

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 233 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
fs_accounts
widget_theysaidso_widget
fs_active_plugins
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Block, Suspend, Report for BuddyPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11314.45 ▲0.151.63 ▼0.1732.17 ▼10.29
Dashboard /wp-admin2,251 ▲635.84 ▲0.9199.55 ▼3.6944.77 ▲6.45
Posts /wp-admin/edit.php2,140 ▲511.99 ▼0.0236.34 ▲2.8036.79 ▲2.97
Add New Post /wp-admin/post-new.php1,550 ▲3118.54 ▼4.58606.66 ▼36.2352.47 ▼12.71
Media Library /wp-admin/upload.php1,439 ▲544.29 ▲0.0598.60 ▼27.8544.05 ▼4.14
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0971.7223.7728.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/bp-toolkit/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_recent-comments

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
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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-toolkit/includes/bp-toolkit-email-functions.php:44

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: suspend, report, moderation, block, buddypress

bp-toolkit/bp-toolkit.php Passed 13 tests

The entry point to "Block, Suspend, Report for BuddyPress" version 3.6.1 is a PHP file that has certain tags in its header comment area
92 characters long description:
Block, Suspend, Report for BuddyPress provides enhanced moderation for your BuddyPress site.

Code Analysis 97% from 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
There were no executable files found in this plugin42,976 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
PHP1448,97219,68238,050
Sass2517281,878
CSS1756271,755
JavaScript7157771,188
SVG52170
XML10035

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity79.17
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes00.00%
Methods1,474
▷ Static methods20013.57%
▷ Public methods1,07272.73%
▷ Protected methods181.22%
▷ Private methods38426.05%
Functions146
▷ Named functions14599.32%
▷ Anonymous functions10.68%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.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
4 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/preapproval.png28.53KB11.34KB▼ 60.25%
admin/assets/images/main.png22.32KB9.49KB▼ 57.50%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%