90% bp-live-notification

Code Review | BuddyPress Live Notification

WordPress plugin BuddyPress Live Notification scored90%from 54 tests.

About plugin

  • Plugin page: bp-live-notification
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 6.3.1
  • First release: Nov 26, 2013
  • Latest release: Jan 28, 2022
  • Number of updates: 13
  • Update frequency: every 229.7 days
  • Top authors: sbrajesh (84.62%)anusharma (23.08%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /30,180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.97ms] Passed 4 tests

Server-side resources used by BuddyPress Live Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.65 ▼4.22
Dashboard /wp-admin3.33 ▲0.0249.38 ▲1.02
Posts /wp-admin/edit.php3.38 ▲0.0245.73 ▲2.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.32 ▼14.28
Media Library /wp-admin/upload.php3.25 ▲0.0233.16 ▼2.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress Live Notification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.181.67 ▼0.1743.51 ▼0.04
Dashboard /wp-admin2,209 ▲214.83 ▼0.06106.87 ▲0.6639.21 ▼5.75
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0136.23 ▼0.6332.24 ▼2.01
Add New Post /wp-admin/post-new.php1,529 ▲818.31 ▼5.11603.25 ▼71.6452.52 ▼0.44
Media Library /wp-admin/upload.php1,385 ▼34.30 ▲0.0895.19 ▼8.9742.95 ▼2.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

bp-live-notification/bp-live-notification.php Passed 13 tests

Analyzing the main PHP file in "BuddyPress Live Notification" version 2.1.0
88 characters long description:
Adds a Facebook Like realtime notification for user on a BuddyPress based social network

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin508 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript378107249
PHP394122180
CSS1103963
PO File10016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin