84% bp-featured-groups

Code Review | BuddyPress Featured Groups

WordPress plugin BuddyPress Featured Groups scored84%from 54 tests.

About plugin

  • Plugin page: bp-featured-groups
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2018
  • Latest release: Apr 14, 2019
  • Number of updates: 28
  • Update frequency: every 4.8 days
  • Top authors: Venutius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,456 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by BuddyPress Featured Groups
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.55 ▼2.36
Dashboard /wp-admin3.34 ▲0.0351.05 ▲1.08
Posts /wp-admin/edit.php3.45 ▲0.0947.88 ▲4.70
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.06 ▼3.38
Media Library /wp-admin/upload.php3.26 ▲0.0340.08 ▲7.31

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress Featured Groups
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.211.64 ▼0.1441.58 ▼5.93
Dashboard /wp-admin2,209 ▲214.90 ▼0.00103.51 ▼10.0945.86 ▲3.33
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0134.58 ▼2.4034.20 ▲2.48
Add New Post /wp-admin/post-new.php1,411 ▼12218.08 ▼5.06547.80 ▼140.9156.43 ▲5.38
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0597.97 ▲0.4041.62 ▼0.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bp-featured-groups/templates/groups-loop-list2.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bp-featured-groups/core/bp-featured-groups-shortcode.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: featured groups, buddypress

bp-featured-groups/bp-featured-groups.php Passed 13 tests

The main PHP file in "BuddyPress Featured Groups" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
85 characters long description:
BuddyPress add-ons which allow site admin to mark members as featured or un-featured.

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 detected1,046 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13288368860
PO File15363137
JavaScript311548
CSS1021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.00
▷ Minimum class complexity5.00
▷ Maximum class complexity16.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods3491.89%
▷ Protected methods00.00%
▷ Private methods38.11%
Functions23
▷ Named functions23100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/controls.png2.19KB0.95KB▼ 56.49%