78% bbp-user-ranking

Code Review | bbp user ranking

WordPress plugin bbp user ranking scored78%from 54 tests.

About plugin

  • Plugin page: bbp-user-ranking
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2016
  • Latest release: Apr 6, 2023
  • Number of updates: 123
  • Update frequency: every 21.4 days
  • Top authors: Robin W (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active /13,544 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
Install script ran successfully

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

An overview of server-side resources used by bbp user ranking
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.33 ▼6.27
Dashboard /wp-admin3.32 ▼0.0255.38 ▼8.91
Posts /wp-admin/edit.php3.38 ▲0.0251.88 ▲2.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0498.20 ▼4.91
Media Library /wp-admin/upload.php3.25 ▲0.0240.04 ▲3.00
bbp User Ranking /wp-admin/options-general.php?page=bbp-user-ranking3.3540.89

Server storage [IO: ▲0.49MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
ur_version
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for bbp user ranking
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.54 ▼1.025.33 ▲3.3842.24 ▼0.75
Dashboard /wp-admin2,218 ▲385.69 ▲0.0486.74 ▲0.0737.65 ▼5.48
Posts /wp-admin/edit.php2,128 ▲282.31 ▲0.3641.47 ▼1.2637.07 ▼1.20
Add New Post /wp-admin/post-new.php1,545 ▲1923.54 ▲0.42646.13 ▲3.5836.64 ▼12.09
Media Library /wp-admin/upload.php1,420 ▲174.40 ▲0.2497.84 ▼2.9740.53 ▼2.24
bbp User Ranking /wp-admin/options-general.php?page=bbp-user-ranking1,6902.6262.6857.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • ur_version
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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)
Almost there, just fix the following server-side errors
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bbp-user-ranking
    • > Notice in wp-content/plugins/bbp-user-ranking/includes/styles.php+353
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbp-user-ranking/includes/user_profile.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbp-user-ranking/includes/generate_css.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbp-user-ranking/includes/functions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bbp-user-ranking/includes/styles.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bbp-user-ranking/bbp-user-ranking.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbp-user-ranking/includes/settings.php:99

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 97% 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 #3 (A sample ranking settings page)
You can take inspiration from this readme.txt

bbp-user-ranking/bbp-user-ranking.php Passed 13 tests

The main PHP script in "bbp user ranking" version 3.5 is automatically included on every request by WordPress
139 characters long description:
This Plugin lets you add ranking elements and badges to topics and replies in bbPress. These appear after the author details on each post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,260 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP115871502,219
CSS1481238
JavaScript1403

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin