83% buddypress-restrict-messages

Code Review | BuddyPress Restrict Messages

WordPress plugin BuddyPress Restrict Messages scored83%from 54 tests.

About plugin

  • Plugin page: buddypress-restri...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 20, 2011
  • Latest release: Dec 16, 2020
  • Number of updates: 21
  • Update frequency: every 157.9 days
  • Top authors: Venutius (80.95%)etivite (23.81%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /7,755 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
Install script ran successfully

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

A check of server-side resources used by BuddyPress Restrict Messages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.38 ▼6.72
Dashboard /wp-admin3.31 ▲0.0144.94 ▼8.22
Posts /wp-admin/edit.php3.36 ▲0.0046.94 ▼3.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.96 ▼8.99
Media Library /wp-admin/upload.php3.23 ▲0.0040.05 ▲8.00

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Restrict Messages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.054.58 ▲2.7941.00 ▼2.73
Dashboard /wp-admin2,206 ▲154.85 ▼0.05106.43 ▼8.4241.88 ▼0.87
Posts /wp-admin/edit.php2,089 ▲32.02 ▲0.0138.75 ▲1.7635.07 ▲2.74
Add New Post /wp-admin/post-new.php1,533 ▲1423.38 ▲0.22698.00 ▲47.6756.77 ▼0.41
Media Library /wp-admin/upload.php1,385 ▼64.11 ▼0.18122.21 ▲24.5051.63 ▲8.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-restrict-messages/bp-restrict-messages-loader.php:28

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
  • Donate link: Please fix this invalid url: "paypal.me/GeorgeChaplin"
Please take inspiration from this readme.txt

buddypress-restrict-messages/bp-restrict-messages-loader.php 85% from 13 tests

The main file in "BuddyPress Restrict Messages" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("buddypress-restrict-messages.php" instead of "bp-restrict-messages-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected578 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP321988578

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity6.10
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods330.00%
▷ Protected methods770.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin