78% bp-blacklist-signup-by-email-domain

Code Review | BP Blacklist Signup by Email Domain

WordPress plugin BP Blacklist Signup by Email Domain scored78%from 54 tests.

About plugin

  • Plugin page: bp-blacklist-sign...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 20, 2018
  • Latest release: Feb 11, 2021
  • Number of updates: 19
  • Update frequency: every 50.9 days
  • Top authors: Venutius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,648 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
This plugin's installer ran successfully

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

Server-side resources used by BP Blacklist Signup by Email Domain
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.99 ▼2.24
Dashboard /wp-admin3.31 ▲0.0048.58 ▼1.31
Posts /wp-admin/edit.php3.36 ▲0.0042.78 ▼3.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.86 ▼19.27
Media Library /wp-admin/upload.php3.23 ▲0.0036.14 ▲2.84

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for BP Blacklist Signup by Email Domain
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.171.67 ▲0.0944.46 ▲7.00
Dashboard /wp-admin2,195 ▲185.59 ▲0.0394.15 ▼12.4042.58 ▼6.95
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0635.64 ▼0.5833.38 ▼4.07
Add New Post /wp-admin/post-new.php1,526 ▼023.14 ▼0.37698.21 ▲10.7256.63 ▲2.33
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.0696.22 ▼21.7540.13 ▼8.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 | 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bp-blacklist-signup-by-email-domain/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-blacklist-signup-by-email-domain/bp-blacklist-signup-by-email-domain.php:21

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

bp-blacklist-signup-by-email-domain/bp-blacklist-signup-by-email-domain.php Passed 13 tests

"BP Blacklist Signup by Email Domain" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
98 characters long description:
Only allow users with email addresses from domains not in the blacklist to register in BuddyPress.

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
Good job! No executable or dangerous file extensions detected175 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP360124175

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.00
▷ Minimum class complexity5.00
▷ Maximum class complexity17.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods535.71%
▷ Public methods1285.71%
▷ Protected methods214.29%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin