100% buddypress-extended-friendship-request

Code Review | BuddyPress Extended Friendship Request

WordPress plugin BuddyPress Extended Friendship Request scored 100% from 54 tests.

About plugin

  • Plugin page: buddypress-extend...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.0
  • WordPress version: 5.8.1
  • First release: Dec 6, 2012
  • Latest release: Mar 20, 2021
  • Number of updates: 23
  • Update frequency: every 131.6 days
  • Top authors: sbrajesh (95.65%)anusharma (8.7%)

Code review

54 tests

User reviews

10 reviews

Install metrics

900+ active / 31,628 total downloads

Benchmarks

Plugin footprint Passed 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: ▼170.80ms] Passed 4 tests

Analyzing server-side resources used by BuddyPress Extended Friendship Request
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.74 ▲14.83
Dashboard /wp-admin3.09 ▲0.0453.90 ▲8.50
Posts /wp-admin/edit.php3.14 ▲0.0444.86 ▲4.18
Add New Post /wp-admin/post-new.php5.45 ▲0.0291.61 ▼694.63
Media Library /wp-admin/upload.php3.04 ▲0.0331.56 ▼1.24

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Extended Friendship Request
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲11315.99 ▲0.709.21 ▼5.0649.54 ▲2.99
Dashboard /wp-admin2,967 ▲305.92 ▼0.25176.95 ▲23.46116.50 ▲5.74
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0069.50 ▲6.7587.32 ▲0.25
Add New Post /wp-admin/post-new.php1,498 ▼2,07918.82 ▲4.00424.43 ▼48.76112.64 ▲0.89
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.01177.52 ▲19.29116.52 ▲4.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: buddypress, friendship, friends, social

buddypress-extended-friendship-request/bp-extended-friendship-request.php 92% from 13 tests

The main PHP file in "BuddyPress Extended Friendship Request" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("buddypress-extended-friendship-request.php" instead of "bp-extended-friendship-request.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,909 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41331081,238
CSS309328
PHP4101169273
PO File2192670

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin