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

Code Review | Activity Notifications for BuddyPress and HipChat

WordPress plugin Activity Notifications for BuddyPress and HipChat scored84%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: 6.3.1
  • 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,528 total downloads

Benchmarks

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

A check of server-side resources used by Activity Notifications for BuddyPress and HipChat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.84 ▲1.90
Dashboard /wp-admin3.32 ▲0.0244.59 ▲0.71
Posts /wp-admin/edit.php3.37 ▲0.0147.79 ▼1.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.70 ▼3.49
Media Library /wp-admin/upload.php3.24 ▲0.0133.95 ▲2.99
BuddyPress and HipChat /wp-admin/options-general.php?page=anbph-settings-page3.2730.95

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Activity Notifications for BuddyPress and HipChat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.35 ▼1.031.82 ▼0.1140.15 ▲0.22
Dashboard /wp-admin2,213 ▲305.88 ▲0.9798.74 ▼25.7442.53 ▼1.09
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0838.22 ▲0.0935.00 ▲2.40
Add New Post /wp-admin/post-new.php1,545 ▲1218.32 ▼4.82604.71 ▼77.7268.52 ▲13.29
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0399.07 ▼0.5644.28 ▼0.22
BuddyPress and HipChat /wp-admin/options-general.php?page=anbph-settings-page8742.0221.7925.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: hipchat, buddypress

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

Analyzing the main PHP file in "Activity Notifications for BuddyPress and HipChat" version 1.0
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same 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 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin283 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP478113283

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected