94% bp-featured-members

Code Review | BuddyPress Featured Members

WordPress plugin BuddyPress Featured Members scored 94% from 54 tests.

About plugin

  • Plugin page: bp-featured-members
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9.8
  • WordPress version: 5.8.1
  • First release: Jan 6, 2017
  • Latest release: Jun 14, 2021
  • Number of updates: 17
  • Update frequency: every 95.2 days
  • Top authors: sbrajesh (94.12%)raviousprime (11.76%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 17,775 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by BuddyPress Featured Members
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0334.64 ▲2.82
Dashboard /wp-admin3.09 ▲0.0343.25 ▼3.97
Posts /wp-admin/edit.php3.14 ▲0.0343.39 ▼12.43
Add New Post /wp-admin/post-new.php5.45 ▲0.0189.32 ▼571.00
Media Library /wp-admin/upload.php3.04 ▲0.0330.82 ▲1.10

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

BuddyPress Featured Members: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.97 ▲0.369.73 ▲0.2643.39 ▼8.16
Dashboard /wp-admin2,973 ▲395.92 ▼0.13132.86 ▼35.8196.62 ▼17.64
Posts /wp-admin/edit.php2,739 ▼02.83 ▼0.0271.48 ▲11.1890.85 ▲1.91
Add New Post /wp-admin/post-new.php2,057 ▼1,64319.36 ▲0.64375.66 ▼66.05109.22 ▼3.69
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.02151.30 ▼11.38119.70 ▲2.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bp-featured-members/core/bp-featured-members-shortcode.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: buddypress, featured members

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

The main PHP script in "BuddyPress Featured Members" version 1.1.2 is automatically included on every request by WordPress
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 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected751 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP9166314628
PO File1293874
JavaScript311548
CSS1021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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%