77% bbp-user-ranks-lite

Code Review | bbPress User Ranks Lite

WordPress plugin bbPress User Ranks Lite scored77%from 54 tests.

About plugin

  • Plugin page: bbp-user-ranks-lite
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.4
  • WordPress version: 6.3.1
  • First release: May 1, 2017
  • Latest release: May 6, 2017
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: pre55 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,509 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.08MB] [CPU: ▼3.95ms] Passed 4 tests

Server-side resources used by bbPress User Ranks Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▼0.0049.09 ▼9.76
Dashboard /wp-admin3.35 ▲0.0554.21 ▲2.84
Posts /wp-admin/edit.php3.46 ▼0.3965.75 ▲8.41
Add New Post /wp-admin/post-new.php5.93 ▲0.04101.92 ▼17.29
Media Library /wp-admin/upload.php3.27 ▲0.0447.99 ▲10.63
User Ranks /wp-admin/options-general.php?page=bur-settings3.2635.68

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for bbPress User Ranks Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.17 ▼0.341.96 ▲0.3157.58 ▲3.66
Dashboard /wp-admin2,202 ▲285.68 ▲0.0393.44 ▼4.6947.40 ▼1.92
Posts /wp-admin/edit.php2,107 ▲41.97 ▼0.0545.73 ▲3.1351.96 ▲7.02
Add New Post /wp-admin/post-new.php1,409 ▼11917.80 ▼3.04708.39 ▼43.8465.09 ▼3.61
Media Library /wp-admin/upload.php1,398 ▼24.12 ▲0.01127.07 ▲6.9662.20 ▲8.94
User Ranks /wp-admin/options-general.php?page=bur-settings7391.338.3227.31

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
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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
    • > GET request to /wp-admin/options-general.php?page=bur-settings
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/bbp-user-ranks-lite/admin/includes/bbpress-user-ranks-lite-settings-display.php on line 6 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/bbp-user-ranks-lite/admin/includes/bbpress-user-ranks-lite-settings-display.php(6): do_settings_fields()
    #1 wp-content/plugins/bbp-user-ranks-lite/admin/class-bbpress-user-ranks-lite-settings.php(34): require_once('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): bbPress_User_Ranks_Lite_Settings->bbpress_user_ranks_lite_display_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): req

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bbp-user-ranks-lite/admin/includes/bbpress-user-ranks-lite-settings-display.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% 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
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

bbp-user-ranks-lite/bbpress-user-ranks-lite.php 69% from 13 tests

"bbPress User Ranks Lite" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("bbp-user-ranks-lite.php" instead of "bbpress-user-ranks-lite.php")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected605 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1319925462
HTML10096
CSS212047

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.70
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
12 PNG files occupy 0.24MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
documentation/assets/user_ranks_02.png4.13KB2.62KB▼ 36.49%
documentation/assets/user_ranks_01.png13.45KB6.31KB▼ 53.12%
documentation/assets/installation_06.png14.94KB7.51KB▼ 49.75%
documentation/assets/installation_05.png9.97KB5.37KB▼ 46.13%
documentation/assets/installation_03.png18.23KB9.70KB▼ 46.79%