93% bp-group-analytics

Code Review | BP Group Analytics

WordPress plugin BP Group Analytics scored 93% from 54 tests.

About plugin

  • Plugin page: bp-group-analytics
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 3.5.1, BuddyPress 1.6.5-5.3.2
  • WordPress version: 5.8.1
  • First release: Apr 19, 2017
  • Latest release: Jan 3, 2020
  • Number of updates: 13
  • Update frequency: every 76.1 days
  • Top authors: er.viveksharma2008 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 776 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼134.46ms] Passed 4 tests

Analyzing server-side resources used by BP Group Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.60 ▲13.53
Dashboard /wp-admin3.06 ▲0.0058.14 ▲17.94
Posts /wp-admin/edit.php3.11 ▲0.0051.93 ▲7.84
Add New Post /wp-admin/post-new.php5.42 ▼0.0293.31 ▼562.24
Media Library /wp-admin/upload.php3.01 ▲0.0035.71 ▲3.03

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for BP Group Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.19 ▲0.629.15 ▼0.4345.23 ▼9.64
Dashboard /wp-admin2,969 ▲355.92 ▼0.03138.91 ▼12.79114.81 ▼1.10
Posts /wp-admin/edit.php2,736 ▼32.70 ▲0.0069.22 ▲0.2796.84 ▲0.95
Add New Post /wp-admin/post-new.php1,498 ▼18518.94 ▲0.39378.06 ▼29.36119.23 ▼6.24
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.02158.62 ▲0.69116.02 ▼10.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-group-analytics/loader.php:73

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


Plugin configuration 90% 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 need to be fixed: Please take inspiration from this readme.txt

bp-group-analytics/loader.php 85% from 13 tests

The main PHP script in "BP Group Analytics" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "WP 3.5.1, BuddyPress 1.6.5")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bp-group-analytics.php" instead of "loader.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
No dangerous file extensions were detected322 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods861.54%
▷ Protected methods538.46%
▷ Private methods00.00%
▷ Named functions12100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.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
No PNG images were found in this plugin