78% bbpress-votes

Code Review | bbPress Votes

WordPress plugin bbPress Votes scored78%from 54 tests.

About plugin

  • Plugin page: bbpress-votes
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 3, 2015
  • Latest release: Jan 14, 2020
  • Number of updates: 33
  • Update frequency: every 52.9 days
  • Top authors: grosbouff (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

100+ active /10,463 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼8.53ms] Passed 4 tests

Server-side resources used by bbPress Votes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2136.36 ▼2.83
Dashboard /wp-admin3.58 ▲0.2445.80 ▼16.43
Posts /wp-admin/edit.php3.70 ▲0.3448.68 ▲3.55
Add New Post /wp-admin/post-new.php6.16 ▲0.2883.21 ▼18.39
Media Library /wp-admin/upload.php3.50 ▲0.2839.49 ▲4.87
bbPress Votes /wp-admin/options-general.php?page=bbpvotes3.4430.91

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

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

Browser metrics Passed 4 tests

Checking browser requirements for bbPress Votes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.124.43 ▲2.4845.14 ▲3.35
Dashboard /wp-admin2,210 ▲195.77 ▲0.91120.15 ▲17.5438.88 ▼5.18
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0535.33 ▼2.3634.84 ▼2.27
Add New Post /wp-admin/post-new.php1,517 ▲317.43 ▼0.09683.48 ▲13.9564.46 ▲13.37
Media Library /wp-admin/upload.php1,386 ▼54.20 ▼0.1294.12 ▼4.4142.99 ▼0.58
bbPress Votes /wp-admin/options-general.php?page=bbpvotes7141.537.9727.42

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
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=bbpvotes
    • > Error in wp-content/plugins/bbpress-votes/bbpvotes-functions.php+139
    Uncaught Error: Call to undefined function bbp_get_topic_post_type() in wp-content/plugins/bbpress-votes/bbpvotes-functions.php:139
    Stack trace:
    #0 wp-content/plugins/bbpress-votes/bbpvotes-functions.php(111): bbpvotes_get_allowed_post_types()
    #1 wp-content/plugins/bbpress-votes/bbpvotes-settings.php(200): bbpvotes_get_enabled_post_types()
    #2 wp-admin/includes/template.php(1824): bbP_Votes_Settings->post_types_callback()
    #3 wp-admin/includes/template.php(1778): do_settings_fields()
    #4 wp-content/plugins/bbpress-votes/bbpvotes-settings.php(355): do_settings_sections()
    #5 wp-includes/class-wp-hook.php(310): bbP_Votes_Settings->settings_page()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 wp-admin/admin.php(259): do_action()
    #9 wp-adm

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbpress-votes/bbpvotes-buddypress.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bbpvotes() in wp-content/plugins/bbpress-votes/bbpvotes-admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bbpress-votes/bbpress-votes.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbpress-votes/bbpvotes-ajax.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbpress-votes/bbpvotes-settings.php:9

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: reputation, vote, rate, buddypress, rating...

bbpress-votes/bbpress-votes.php 92% from 13 tests

The primary PHP file in "bbPress Votes" version 1.2.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,991 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP75062201,297
PO File3201220467
JavaScript1321103
Sass110066
CSS101051
Ruby18137

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.50
▷ Minimum class complexity7.00
▷ Maximum class complexity61.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods61
▷ Static methods11.64%
▷ Public methods6098.36%
▷ Protected methods00.00%
▷ Private methods11.64%
Functions31
▷ Named functions31100.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
There were not PNG files found in your plugin