99% buddypress-notifications-widget

Code Review | BuddyPress Notification Widget

WordPress plugin BuddyPress Notification Widget scored 99% from 53 tests.

About plugin

  • Plugin page: buddypress-notifi...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7.0
  • WordPress version: 5.8.1
  • First release: Nov 22, 2013
  • Latest release: Mar 20, 2021
  • Number of updates: 20
  • Update frequency: every 133.8 days
  • Top authors: sbrajesh (70%)raviousprime (25%)anusharma (15%)

Code review

53 tests

User reviews

6 reviews

Install metrics

2,000+ active / 40,133 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
Install script ran successfully

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

A check of server-side resources used by BuddyPress Notification Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.71 ▼0.0118.39 ▼1.28
Dashboard /wp-admin3.06 ▲0.0143.61 ▲0.29
Posts /wp-admin/edit.php3.11 ▲0.0145.61 ▲9.77
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.46 ▼1,007.24
Media Library /wp-admin/upload.php3.00 ▼0.0028.82 ▼7.15

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Notification Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,682 ▲7615.87 ▲0.3712.75 ▲4.7650.71 ▲6.05
Dashboard /wp-admin2,959 ▲1066.19 ▲0.35136.74 ▼3.10101.77 ▲2.74
Posts /wp-admin/edit.php2,706 ▲32.69 ▼0.0065.58 ▲4.0399.82 ▲12.24
Add New Post /wp-admin/post-new.php1,659 ▼19218.78 ▲1.28356.27 ▼4.37122.27 ▲13.64
Media Library /wp-admin/upload.php1,772 ▼04.99 ▲0.00144.78 ▲6.22107.72 ▼5.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.72MB] 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 successfully, without leaving any 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
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

buddypress-notifications-widget/notifications-widget.php 92% from 13 tests

"BuddyPress Notification Widget" version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buddypress-notifications-widget.php" instead of "notifications-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin424 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP385104264
PO File34044125
JavaScript18535

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin