83% buddypress-restrict-group-creation

Code Review | BuddyPress Restrict Group Creation

WordPress plugin BuddyPress Restrict Group Creation scored83%from 54 tests.

About plugin

  • Plugin page: buddypress-restri...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 8, 2010
  • Latest release: Feb 17, 2021
  • Number of updates: 47
  • Update frequency: every 85.1 days
  • Top authors: nuprn1 (59.57%)Venutius (29.79%)etivite (14.89%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /14,951 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by BuddyPress Restrict Group Creation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.50 ▼3.53
Dashboard /wp-admin3.31 ▲0.0151.38 ▲2.36
Posts /wp-admin/edit.php3.36 ▲0.0046.76 ▼2.67
Add New Post /wp-admin/post-new.php5.89 ▲0.00108.24 ▲12.52
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲3.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Restrict Group Creation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.394.64 ▲2.9338.05 ▼4.42
Dashboard /wp-admin2,206 ▲144.88 ▼0.04107.29 ▼4.0143.00 ▲2.24
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0139.48 ▼1.0533.51 ▼1.42
Add New Post /wp-admin/post-new.php1,542 ▲2318.41 ▼4.77617.73 ▼63.0363.69 ▲10.87
Media Library /wp-admin/upload.php1,388 ▲94.19 ▼0.0194.15 ▼5.3741.54 ▼2.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-restrict-group-creation/bp-restrict-group-creation-loader.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid version format
  • Plugin Name: You should set the name of your plugin on the first line ( === buddypress-restrict-group-creation === )
  • Screenshots: Add a description for screenshot #1 in buddypress-restrict-group-creation/assets to your readme.txt
  • Donate link: Invalid url: "paypal.me/GeorgeChaplin"
You can look at the official readme.txt

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

Analyzing the main PHP file in "BuddyPress Restrict Group Creation" version 1.1.2
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("buddypress-restrict-group-creation.php" instead of "bp-restrict-group-creation-loader.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin534 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP317464455
PO File1303879

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.84
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%
Functions12
▷ Named functions12100.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
There are no PNG files in this plugin