62% bbp-core

Code Review | BBP Core - Expand bbPress powered forums with useful features

WordPress plugin BBP Core - Expand bbPress powered forums with useful features scored62%from 54 tests.

About plugin

  • Plugin page: bbp-core
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 4, 2022
  • Latest release: Nov 27, 2023
  • Number of updates: 21
  • Update frequency: every 22.9 days
  • Top authors: arafatjamil01 (61.9%)spiderdevs (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /5,584 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.27MB] [CPU: ▼25.22ms] 75% from 4 tests

An overview of server-side resources used by BBP Core - Expand bbPress powered forums with useful features
The following require your attention
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.27MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.27 ▲5.8132.77 ▼18.42
Dashboard /wp-admin9.29 ▲5.9444.81 ▼15.89
Posts /wp-admin/edit.php9.29 ▲5.9338.12 ▼10.02
Add New Post /wp-admin/post-new.php9.29 ▲3.4036.64 ▼56.54
Media Library /wp-admin/upload.php9.29 ▲6.0640.53 ▲7.22
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2939.93

Server storage [IO: ▲7.09MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 486 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-comments
db_upgraded
bbpc_installed
bbpc_version
recovery_mode_email_last_sent
widget_theysaidso_widget
can_compress_scripts
widget_bbpc_forum_info
theysaidso_admin_options
fs_accounts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for BBP Core - Expand bbPress powered forums with useful features
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,775 ▲2814.29 ▲0.010.97 ▼0.8310.41 ▼32.76
Dashboard /wp-admin2,300 ▲1235.58 ▼0.0997.13 ▲1.2547.53 ▲6.22
Posts /wp-admin/edit.php1,165 ▼9381.53 ▼0.488.44 ▼30.1926.64 ▼11.39
Add New Post /wp-admin/post-new.php45 ▼1,4820.41 ▼22.730.08 ▼708.5711.40 ▼52.19
Media Library /wp-admin/upload.php1,505 ▲1114.26 ▲0.08101.34 ▲8.5357.97 ▲16.00
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1111.7127.6731.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bbpc-notify-review handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 14 options
    • bbp_core_settings
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-posts
    • widget_bbpc_forum_info
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • bbpc_version
    • fs_accounts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=freemius
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bbpc-notify-review handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bbp-core/includes/Elementor/Search/keywords.php
  • 54× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/bbp-core/includes/Elementor/inc/hero/ajax-search-results.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function features\\add_action() in wp-content/plugins/bbp-core/includes/features/bbp_solved_topic.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin\\menu\\add_action() in wp-content/plugins/bbp-core/includes/admin/menu/Delete_Topic.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Admin\\add_action() in wp-content/plugins/bbp-core/includes/admin/menu/Create_Topic.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bbp-core/includes/features/bbpc_attachments/forms/attachments/meta_forum.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/bbp-core/includes/Elementor/inc/single-forum/single-forum-2.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/bbp-core/includes/admin/settings/options/options_shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Admin\\add_action() in wp-content/plugins/bbp-core/includes/admin/menu/Create_Forum.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CSF' not found in wp-content/plugins/bbp-core/includes/admin/settings/options/options_appearance.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbp-core/includes/ajax_actions.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

bbp-core/bbp-core.php Passed 13 tests

This is the main PHP file of "BBP Core - Expand bbPress powered forums with useful features" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
Expand bbPress powered forums with useful features like - private reply, solved topics ...

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected97,923 lines of code in 419 files:
LanguageFilesBlank linesComment linesLines of code
PHP26111,54119,04747,095
JavaScript294,7403,07321,741
CSS3994182913,063
Sass631,98827312,835
SVG24022,131
HTML1750480
JSON100364
Markdown1680214

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity44.32
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes144
▷ Abstract classes42.78%
▷ Concrete classes14097.22%
▷ Final classes10.71%
Methods1,694
▷ Static methods24414.40%
▷ Public methods1,27775.38%
▷ Protected methods291.71%
▷ Private methods38822.90%
Functions177
▷ Named functions17397.74%
▷ Anonymous functions42.26%
Constants158
▷ Global constants11069.62%
▷ Class constants4830.38%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon/folder-open.png6.57KB3.73KB▼ 43.21%
assets/img/admin/pro-icon.png0.39KB0.29KB▼ 27.30%
includes/features/bbpc_attachments/css/gfx/attachment.png3.09KB0.38KB▼ 87.53%
includes/features/bbpc_attachments/css/gfx/icons.png7.71KB2.64KB▼ 65.75%
assets/img/forums4.png47.24KB13.22KB▼ 72.01%