68% bbresolutions

Code Review | bbResolutions

WordPress plugin bbResolutions scored 68% from 54 tests.

About plugin

  • Plugin page: bbresolutions
  • Plugin version: 0.7
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 5.8.1
  • First release: Oct 3, 2014
  • Latest release: Jun 17, 2020
  • Number of updates: 18
  • Update frequency: every 115.8 days
  • Top authors: alex-ye (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 3,619 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲4.57MB] [CPU: ▼116.02ms] Passed 4 tests

Analyzing server-side resources used by bbResolutions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.12 ▲5.2967.72 ▲28.52
Dashboard /wp-admin8.14 ▲5.0977.36 ▲27.00
Posts /wp-admin/edit.php8.14 ▲5.0379.07 ▲22.94
Add New Post /wp-admin/post-new.php8.48 ▲3.05118.53 ▼535.21
Media Library /wp-admin/upload.php8.14 ▲5.1456.84 ▲21.19
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius8.1455.83
bbResolutions /wp-admin/admin.php?page=bbresolutions8.1456.67

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 200 new files
Database: no new tables, 4 new options
New WordPress options
fs_gdpr
fs_accounts
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

An overview of browser requirements for bbResolutions
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,745 ▲10815.72 ▲0.129.93 ▲0.3849.99 ▼3.81
Dashboard /wp-admin3,011 ▲805.99 ▲0.02144.18 ▼14.56130.89 ▲16.53
Posts /wp-admin/edit.php2,787 ▲482.70 ▲0.0168.31 ▼3.78101.85 ▲11.40
Add New Post /wp-admin/post-new.php1,691 ▲817.86 ▼0.91383.88 ▼11.96106.13 ▼8.85
Media Library /wp-admin/upload.php1,856 ▲495.04 ▲0.01172.23 ▲19.67135.75 ▲7.37
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4652.0956.4177.83
bbResolutions /wp-admin/admin.php?page=bbresolutions1,3352.2961.61109.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/bbresolutions/freemius/includes/class-freemius.php+8218
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bbresolutions/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/bbresolutions/locales/index.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bbResolutions\\add_action() in wp-content/plugins/bbresolutions/src/bbResolutions/src/bbpress/topic-actions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/bbresolutions/freemius/templates/account/partials/addon.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/bbresolutions/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bbResolutions\\add_action() in wp-content/plugins/bbresolutions/src/bbResolutions/src/bbpress/widgets.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bbresolutions/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/bbresolutions/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/bbresolutions/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bbresolutions/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bbresolutions/main.php:39
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bbresolutions/freemius/templates/account/partials/addon.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: bbpress, buddypress, support, helpdesk

bbresolutions/main.php 92% from 13 tests

The principal PHP file in "bbResolutions" v. 0.7 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bbresolutions.php" instead of "main.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin46,280 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP1247,30316,29530,531
PO File136,9908,50015,298
JavaScript33459194
Markdown1610192
JSON30051
CSS110014

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity78.31
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,163
▷ Static methods18315.74%
▷ Public methods82170.59%
▷ Protected methods151.29%
▷ Private methods32728.12%
Functions111
▷ Named functions11099.10%
▷ Anonymous functions10.90%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/bbresolutions.png9.16KB5.26KB▼ 42.58%