94% activity-notifications-for-buddypress-and-hipchat

Code Review | Activity Notifications for BuddyPress and HipChat

WordPress plugin Activity Notifications for BuddyPress and HipChat scored 94% from 54 tests.

About plugin

  • Plugin page: activity-notifica...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 5.9.2
  • First release: Jan 5, 2016
  • Latest release: Feb 21, 2016
  • Number of updates: 6
  • Update frequency: every 8.0 days
  • Top authors: metodiew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,228 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼301.55ms] Passed 4 tests

This is a short check of server-side resources used by Activity Notifications for BuddyPress and HipChat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1155.71 ▲6.53
Dashboard /wp-admin3.46 ▲0.0631.22 ▼8.16
Posts /wp-admin/edit.php3.69 ▲0.0535.70 ▼3.45
Add New Post /wp-admin/post-new.php6.92 ▼0.0588.89 ▼1,196.94
Media Library /wp-admin/upload.php3.34 ▲0.0426.17 ▲2.35
BuddyPress and HipChat /wp-admin/options-general.php?page=anbph-settings-page3.3321.74

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Activity Notifications for BuddyPress and HipChat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.87 ▼0.147.38 ▲1.352.31 ▼0.26
Dashboard /wp-admin2,897 ▲366.16 ▼0.01115.83 ▼18.51157.74 ▼7.19
Posts /wp-admin/edit.php2,693 ▲23.24 ▲0.0070.27 ▲7.10145.66 ▲2.74
Add New Post /wp-admin/post-new.php1,763 ▲10217.49 ▲0.33414.21 ▲24.29156.56 ▲0.07
Media Library /wp-admin/upload.php1,700 ▲25.52 ▲0.02144.16 ▼2.04180.00 ▼2.53
BuddyPress and HipChat /wp-admin/options-general.php?page=anbph-settings-page1,1232.4154.38114.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/activity-notifications-for-buddypress-and-hipchat/inc/settings-page.php:3

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: hipchat, buddypress

activity-notifications-for-buddypress-and-hipchat/activity-notifications-buddypress-hipchat.php 85% from 13 tests

"Activity Notifications for BuddyPress and HipChat" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("activity-notifications-for-buddypress-and-hipchat.php" instead of "activity-notifications-buddypress-hipchat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected283 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP478113283

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.67
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants321.43%
▷ Class constants1178.57%
▷ Public constants11100.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