84% bbpress-admin-bar-addition

Code Review | bbPress Admin Bar Addition

WordPress plugin bbPress Admin Bar Addition scored84%from 54 tests.

About plugin

  • Plugin page: bbpress-admin-bar...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2011
  • Latest release: Feb 21, 2019
  • Number of updates: 44
  • Update frequency: every 59.9 days
  • Top authors: daveshine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /46,921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.22ms] Passed 4 tests

Analyzing server-side resources used by bbPress Admin Bar Addition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.07 ▼1.57
Dashboard /wp-admin3.43 ▲0.1249.37 ▼4.19
Posts /wp-admin/edit.php3.54 ▲0.1850.76 ▲0.96
Add New Post /wp-admin/post-new.php6.01 ▲0.12101.78 ▲5.83
Media Library /wp-admin/upload.php3.35 ▲0.1240.34 ▼0.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for bbPress Admin Bar Addition
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.74 ▲0.292.31 ▲0.6642.06 ▲0.73
Dashboard /wp-admin2,206 ▲214.88 ▲0.01131.71 ▼2.9047.73 ▲3.54
Posts /wp-admin/edit.php2,097 ▲52.05 ▲0.0438.87 ▼4.3033.70 ▼3.07
Add New Post /wp-admin/post-new.php1,536 ▲320.93 ▼2.11675.01 ▼29.4056.82 ▼0.90
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.11120.14 ▲7.4549.70 ▼0.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bbpress-admin-bar-addition/includes/bbpaba-themes.php:40
    • > PHP Notice
      Undefined variable: bbpgroup_check_item in wp-content/plugins/bbpress-admin-bar-addition/includes/bbpaba-resources.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/bbpress-admin-bar-addition/includes/bbpaba-admin.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bbpress-admin-bar-addition/includes/bbpaba-resources.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbpress-admin-bar-addition/includes/bbpaba-branding.php:279
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bbpress-admin-bar-addition/bbpress-admin-bar-addition.php:56

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 93% 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

bbpress-admin-bar-addition/bbpress-admin-bar-addition.php 92% from 13 tests

The primary PHP file in "bbPress Admin Bar Addition" version 1.7.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,598 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP62876931,032
PO File2249483566

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.84
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%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
20 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bbpaba-icon-turquoise.png0.61KB0.56KB▼ 8.06%
images/bbpaba-icon-gray.png0.57KB0.52KB▼ 8.53%
screenshot-8.png10.09KB7.31KB▼ 27.54%
screenshot-1.png6.28KB4.77KB▼ 24.08%
images/bbpress-icon-alternate.png0.47KB0.43KB▼ 9.54%