78% bbp-private-forum-visibility

Code Review | Private forums visibility

WordPress plugin Private forums visibility scored78%from 54 tests.

About plugin

  • Plugin page: bbp-private-forum...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0
  • WordPress version: 6.3.1
  • First release: Apr 10, 2014
  • Latest release: Jan 23, 2022
  • Number of updates: 33
  • Update frequency: every 86.3 days
  • Top authors: Robin W (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,570 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.95ms] Passed 4 tests

Analyzing server-side resources used by Private forums visibility
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0644.03 ▲0.17
Dashboard /wp-admin3.37 ▲0.0649.97 ▼0.24
Posts /wp-admin/edit.php3.42 ▲0.0654.60 ▼0.12
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.43 ▼19.60
Media Library /wp-admin/upload.php3.29 ▲0.0638.44 ▲1.16
Private Forums Visibility /wp-admin/options-general.php?page=private-forum-visibility-settings3.2332.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Private forums visibility
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.12 ▼0.101.70 ▼0.3744.72 ▼4.16
Dashboard /wp-admin2,199 ▲225.61 ▼0.0489.92 ▼9.3036.34 ▼9.24
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0441.45 ▲1.5436.44 ▲2.29
Add New Post /wp-admin/post-new.php1,529 ▼123.18 ▲0.21668.83 ▼23.1358.57 ▲2.72
Media Library /wp-admin/upload.php1,398 ▼24.19 ▲0.0895.06 ▼28.4640.83 ▼11.46
Private Forums Visibility /wp-admin/options-general.php?page=private-forum-visibility-settings9932.0025.0835.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=private-forum-visibility-settings
    • > Notice in wp-content/plugins/bbp-private-forum-visibility/includes/settings.php+198
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bbp-private-forum-visibility/includes/functions.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbp-private-forum-visibility/includes/settings.php:165
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bbp-private-forum-visibility/bbp-private-forums-visibility.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (A sample subforum list with private showing for a non logged-in user, and descriptions set.)
The official readme.txt is a good inspiration

bbp-private-forum-visibility/bbp-private-forums-visibility.php 85% from 13 tests

The principal PHP file in "Private forums visibility" v. 2.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bbp-private-forum-visibility.php" instead of "bbp-private-forums-visibility.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

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
No dangerous file extensions were detected295 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39749295

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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