83% bp-group-analytics

Code Review | BP Group Analytics

WordPress plugin BP Group Analytics scored83%from 54 tests.

About plugin

  • Plugin page: bp-group-analytics
  • Plugin version: 1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 3.5.1, BuddyPress 1.6.5-6.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2017
  • Latest release: Nov 19, 2022
  • Number of updates: 14
  • Update frequency: every 145.7 days
  • Top authors: er.viveksharma2008 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,195 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼8.11ms] Passed 4 tests

Analyzing server-side resources used by BP Group Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.63 ▼3.91
Dashboard /wp-admin3.31 ▼0.0445.58 ▼15.64
Posts /wp-admin/edit.php3.36 ▲0.0044.01 ▼1.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.25 ▼11.33
Media Library /wp-admin/upload.php3.23 ▲0.0034.19 ▲1.00

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, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

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 /2,789 ▲2814.35 ▼0.091.69 ▼0.0135.24 ▼9.75
Dashboard /wp-admin2,192 ▲215.55 ▼0.0482.07 ▼9.3437.37 ▼6.10
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0138.57 ▲3.0932.64 ▼5.29
Add New Post /wp-admin/post-new.php1,526 ▼323.39 ▲0.27658.92 ▼1.8757.88 ▼0.84
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.0196.44 ▼5.9742.57 ▼2.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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

Optimizations

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.2 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
PHP476128305
Markdown17010
CSS1275
JavaScript1042

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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods861.54%
▷ Protected methods538.46%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ 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