83% bbpress-protected-forums

Code Review | bbPress Protected Forums

WordPress plugin bbPress Protected Forums scored83%from 54 tests.

About plugin

  • Plugin page: bbpress-protected...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.4
  • WordPress version: 6.3.1
  • First release: Sep 19, 2012
  • Latest release: Sep 20, 2012
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: JordiPlana (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /18,340 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by bbPress Protected Forums
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.07 ▲2.16
Dashboard /wp-admin3.33 ▼0.0243.79 ▼18.23
Posts /wp-admin/edit.php3.38 ▲0.0247.14 ▲1.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.48 ▼6.59
Media Library /wp-admin/upload.php3.25 ▲0.0237.00 ▲3.47

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

bbPress Protected Forums: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.47 ▼0.122.07 ▲0.4144.89 ▲6.06
Dashboard /wp-admin2,209 ▲174.86 ▼0.12100.22 ▼8.1838.96 ▼4.43
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0142.32 ▲8.7135.92 ▲0.02
Add New Post /wp-admin/post-new.php1,547 ▲1318.36 ▼5.09657.96 ▲54.6464.86 ▲9.21
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0393.68 ▼5.2545.01 ▲2.50

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/bbpress-protected-forums/bbpress-pf.php:11

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Metabox with options available while editing a forum in the dashboard.) image missing
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

bbpress-protected-forums/bbpress-pf.php 92% from 13 tests

The main PHP script in "bbPress Protected Forums" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bbpress-protected-forums.php" instead of "bbpress-pf.php")

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
Everything looks great! No dangerous files found in this plugin126 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1131284
PO File28642

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions5
▷ Named functions5100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.24KB14.76KB▼ 61.40%