83% bp-favorite-notification

Code Review | BuddyPress Favorite Notification

WordPress plugin BuddyPress Favorite Notification scored 83% from 54 tests.

About plugin

  • Plugin page: bp-favorite-notif...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2015
  • Latest release: Dec 2, 2021
  • Number of updates: 18
  • Update frequency: every 128.2 days
  • Top authors: vapvarun (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 17,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by BuddyPress Favorite Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.19 ▼4.47
Dashboard /wp-admin3.31 ▲0.0043.29 ▼0.22
Posts /wp-admin/edit.php3.36 ▲0.0045.94 ▼4.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.70 ▼16.13
Media Library /wp-admin/upload.php3.23 ▲0.0032.08 ▲1.11

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

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

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Favorite Notification
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.061.72 ▼0.0543.16 ▼1.64
Dashboard /wp-admin2,203 ▲125.80 ▲0.9399.41 ▼3.9539.77 ▼0.06
Posts /wp-admin/edit.php2,089 ▲32.18 ▲0.1539.21 ▼0.8734.19 ▼1.19
Add New Post /wp-admin/post-new.php1,514 ▼1917.71 ▼5.60667.96 ▲24.2355.34 ▲1.04
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0692.90 ▼7.0140.84 ▼0.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 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 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bp-favorite-notification/include/class-bpfn-admin-feedback.php:311

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)
There were no browser issues found

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: The official readme.txt might help

bp-favorite-notification/favorite-notification.php 85% from 13 tests

"BuddyPress Favorite Notification" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bp-favorite-notification.php" instead of "favorite-notification.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected446 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP573194384
JavaScript13562

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity18.50
▷ Minimum class complexity13.00
▷ Maximum class complexity24.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.20MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png102.06KB33.23KB▼ 67.44%
screenshot-2.png93.20KB29.06KB▼ 68.82%
assest/images/bp_fav_notification.png6.04KB4.00KB▼ 33.71%