83% buddypress-desktop-notification

Code Review | BuddyPress Desktop Notification

WordPress plugin BuddyPress Desktop Notification scored83%from 54 tests.

About plugin

  • Plugin page: buddypress-deskto...
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.1
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: Mar 11, 2016
  • Number of updates: 21
  • Update frequency: every 15.4 days
  • Top authors: websupporter (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

70+ active /8,210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.37ms] Passed 4 tests

A check of server-side resources used by BuddyPress Desktop Notification
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.21 ▼4.16
Dashboard /wp-admin3.34 ▲0.0447.42 ▲3.09
Posts /wp-admin/edit.php3.40 ▲0.0446.04 ▲3.06
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.95 ▼2.31
Media Library /wp-admin/upload.php3.27 ▲0.0436.83 ▲1.94

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Desktop Notification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲17613.61 ▼1.049.29 ▲7.5443.65 ▼7.91
Dashboard /wp-admin2,209 ▲244.86 ▼1.01104.50 ▲5.1240.88 ▼2.79
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0437.71 ▼6.0133.58 ▼2.49
Add New Post /wp-admin/post-new.php1,534 ▲623.13 ▲4.67637.31 ▲18.7248.43 ▼6.51
Media Library /wp-admin/upload.php1,391 ▲64.17 ▲0.0497.33 ▼30.7848.16 ▼1.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-desktop-notification/desktop-notification.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: The official readme.txt is a good inspiration

buddypress-desktop-notification/desktop-notification.php 85% from 13 tests

Analyzing the main PHP file in "BuddyPress Desktop Notification" version 0.8
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buddypress-desktop-notification.php" instead of "desktop-notification.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin287 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13530184
JavaScript116054
PO File27749

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin