73% blacklist-whitelist-domains

Code Review | Blacklist & Whitelist Domains for Registration

WordPress plugin Blacklist & Whitelist Domains for Registration scored73%from 54 tests.

About plugin

  • Plugin page: blacklist-whiteli...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 13, 2021
  • Latest release: Dec 15, 2021
  • Number of updates: 5
  • Update frequency: every 7.2 days
  • Top authors: codicone (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /701 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲1.78ms] Passed 4 tests

Server-side resources used by Blacklist & Whitelist Domains for Registration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.47 ▼3.10
Dashboard /wp-admin3.33 ▲0.0249.77 ▲0.76
Posts /wp-admin/edit.php3.44 ▲0.0848.16 ▲4.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.34 ▲9.50
Media Library /wp-admin/upload.php3.25 ▲0.0237.56 ▲5.37

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
wp_bwdr_log
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blacklist & Whitelist Domains for Registration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.18 ▼1.121.62 ▼0.2542.42 ▼6.15
Dashboard /wp-admin2,222 ▲314.90 ▼1.00107.45 ▲6.2341.96 ▲1.46
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0238.75 ▲2.7235.84 ▲1.83
Add New Post /wp-admin/post-new.php1,528 ▼117.87 ▼0.14599.88 ▼56.3766.68 ▲6.42
Media Library /wp-admin/upload.php1,404 ▲164.24 ▲0.0697.16 ▼2.0340.44 ▼1.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_bwdr_log
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/blacklist-whitelist-domains/blacklist-whitelist-domains-registration.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blacklist-whitelist-domains/inc/bwdr-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/blacklist-whitelist-domains/inc/bwdr-approval.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blacklist-whitelist-domains/inc/bwdr-log.php:13

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, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: email, registration, spam registration, blacklist, whitelist...

blacklist-whitelist-domains/blacklist-whitelist-domains-registration.php 69% from 13 tests

The main PHP script in "Blacklist & Whitelist Domains for Registration" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Description: Please don't use more than 140 characters for the plugin description (currently 161 characters long)
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("blacklist-whitelist-domains.php" instead of "blacklist-whitelist-domains-registration.php")

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 plugin582 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4177237570
CSS10010
JavaScript115712

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.80
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods50
▷ Static methods12.00%
▷ Public methods4692.00%
▷ Protected methods00.00%
▷ Private methods48.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin