94% bp-groups-suggestions

Code Review | BP Groups Suggestions

WordPress plugin BP Groups Suggestions scored 94% from 54 tests.

About plugin

  • Plugin page: bp-groups-suggest...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 5.8.1
  • First release: Oct 30, 2013
  • Latest release: Dec 10, 2018
  • Number of updates: 31
  • Update frequency: every 60.2 days
  • Top authors: lenasterg (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 5,268 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
Installer ran successfully

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

This is a short check of server-side resources used by BP Groups Suggestions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1237.71 ▲14.38
Dashboard /wp-admin3.07 ▲0.0139.64 ▼8.35
Posts /wp-admin/edit.php3.12 ▲0.0147.26 ▲2.06
Add New Post /wp-admin/post-new.php5.43 ▼0.0192.29 ▼697.82
Media Library /wp-admin/upload.php3.01 ▲0.0134.60 ▼1.95

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BP Groups Suggestions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.17 ▲0.718.06 ▼0.4747.76 ▲2.91
Dashboard /wp-admin2,989 ▲585.92 ▼0.05143.09 ▼9.49122.70 ▼2.05
Posts /wp-admin/edit.php2,739 ▼02.82 ▲0.1271.34 ▲9.3198.50 ▼4.37
Add New Post /wp-admin/post-new.php1,687 ▼2,04818.79 ▲0.26375.71 ▼94.22113.03 ▼0.01
Media Library /wp-admin/upload.php1,807 ▼04.99 ▼0.04170.05 ▲6.23122.68 ▲3.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-groups-suggestions/loader.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-groups-suggestions/bp-suggest-functions.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-groups-suggestions/bp-group-suggest.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-groups-suggestions/groups/suggested_groups.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The "Suggested groups" tab on Groups Directory page.), #2 (Hide this Suggestion button on Group description (in case the group is on the suggested groups list).), #3 (Message on Group home page is the group, which is displayed in every visit after the group is removed from suggestion list.), #4 (Message on "Suggested groups" tab on Groups Directory page, in case none group is suggested), #5 (Widget settings)
You can take inspiration from this readme.txt

bp-groups-suggestions/loader.php 92% from 13 tests

"BP Groups Suggestions" version 1.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bp-groups-suggestions.php" instead of "loader.php")

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 detected859 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5113272601
JavaScript1196132
PO File24254123
CSS1073

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity21.00
▷ Minimum class complexity4.00
▷ Maximum class complexity38.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1152.38%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png44.03KB19.33KB▼ 56.10%
screenshot-4.png17.90KB9.24KB▼ 48.38%
screenshot-1.png38.14KB17.28KB▼ 54.68%
screenshot-2.png50.68KB21.94KB▼ 56.71%
images/icon-tool.png0.96KB0.78KB▼ 18.88%