78% buddy-registration-widget

Code Review | BuddyPress Registration Widget

WordPress plugin BuddyPress Registration Widget scored 78% from 54 tests.

About plugin

  • Plugin page: buddy-registratio...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Mar 2, 2016
  • Latest release: Jan 5, 2021
  • Number of updates: 16
  • Update frequency: every 110.6 days
  • Top authors: pawaryogesh1989 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active / 17,089 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼145.79ms] Passed 4 tests

Server-side resources used by BuddyPress Registration Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0833.05 ▼2.47
Dashboard /wp-admin3.14 ▲0.0948.12 ▼0.13
Posts /wp-admin/edit.php3.19 ▲0.0936.37 ▼10.64
Add New Post /wp-admin/post-new.php5.50 ▲0.0788.55 ▼569.90
Media Library /wp-admin/upload.php3.08 ▲0.0832.78 ▲0.42
BuddyPress Registration Options /wp-admin/options-general.php?page=buddy-register-widget-options3.0732.75

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_buddy_registration

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Registration Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.86 ▲0.288.86 ▼1.2846.04 ▲2.24
Dashboard /wp-admin2,978 ▲475.93 ▼0.06144.55 ▼4.46109.69 ▼7.45
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0176.10 ▲8.4184.95 ▼9.08
Add New Post /wp-admin/post-new.php1,501 ▼2,19918.83 ▲0.16391.59 ▼70.57108.30 ▲4.04
Media Library /wp-admin/upload.php1,812 ▲25.02 ▲0.01157.66 ▼0.37121.55 ▲8.31
BuddyPress Registration Options /wp-admin/options-general.php?page=buddy-register-widget-options1,2122.0557.9670.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_buddy_registration

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/buddy-registration-widget/buddyregistration.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Buddy_Registration' not found in wp-content/plugins/buddy-registration-widget/classes/class.buddy.profile.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/buddy-registration-widget/templates/settings/buddy-setting-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddypress() in wp-content/plugins/buddy-registration-widget/templates/shortcode-form-template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddypress() in wp-content/plugins/buddy-registration-widget/templates/form-template.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Buddy_Registration' not found in wp-content/plugins/buddy-registration-widget/classes/class.buddy.profile.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

buddy-registration-widget/buddyregistration.php 85% from 13 tests

Analyzing the main PHP file in "BuddyPress Registration Widget" version 2.1.2
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: The principal plugin file should be the same as the plugin slug ("buddy-registration-widget.php" instead of "buddyregistration.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
Good job! No executable or dangerous file extensions detected483 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5149155396
JavaScript115351
CSS12036

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity19.50
▷ Minimum class complexity16.00
▷ Maximum class complexity23.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin