84% network-subsite-user-registration

Code Review | Network Subsite User Registration

WordPress plugin Network Subsite User Registration scored 84% from 54 tests.

About plugin

  • Plugin page: network-subsite-u...
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 5.9.2
  • First release: Mar 7, 2017
  • Latest release: Jan 19, 2022
  • Number of updates: 175
  • Update frequency: every 10.2 days
  • Top authors: JustinTicktock (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

20+ active / 25,776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼308.20ms] Passed 4 tests

Analyzing server-side resources used by Network Subsite User Registration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1951.15 ▼0.07
Dashboard /wp-admin3.53 ▲0.1335.51 ▼0.03
Posts /wp-admin/edit.php3.76 ▲0.1240.06 ▲3.84
Add New Post /wp-admin/post-new.php7.00 ▲0.0397.04 ▼1,231.93
Media Library /wp-admin/upload.php3.41 ▲0.1224.42 ▼0.78

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 1 new option
New WordPress options
nsur_install_date

Browser metrics Passed 4 tests

An overview of browser requirements for Network Subsite User Registration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,780 ▲2615.59 ▲0.016.27 ▲0.211.99 ▼0.56
Dashboard /wp-admin2,901 ▲406.15 ▼0.04121.98 ▼30.13152.77 ▼22.67
Posts /wp-admin/edit.php2,704 ▲133.24 ▼0.0069.59 ▲4.38155.54 ▲9.31
Add New Post /wp-admin/post-new.php1,669 ▼8916.44 ▼4.85409.27 ▼42.69158.39 ▼3.48
Media Library /wp-admin/upload.php1,714 ▲165.50 ▼0.03145.28 ▲2.60183.54 ▼5.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 1 option
    • nsur_install_date

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 30× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp51.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/network-subsite-user-registration/template/page-registration-notice-logged-out.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nocache_headers() in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp54.php:14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp496.php on line 12
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp5.php on line 12
    • > PHP Warning
      require_once(ABSPATHwp-load.php): failed to open stream: No such file or directory in wp-content/plugins/network-subsite-user-registration/template/page-registration-notice-logged-out.php on line 8
    • > PHP Warning
      require_once(ABSPATHwp-load.php): failed to open stream: No such file or directory in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp496.php on line 12
    • > PHP Warning
      require_once(ABSPATHwp-load.php): failed to open stream: No such file or directory in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp51.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nocache_headers() in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp59.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/network-subsite-user-registration/template/page-signup-wp5.php on line 12

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 93% 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
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === network-subsite-user-registration === )
You can take inspiration from this readme.txt

network-subsite-user-registration/network-subsite-user-registration.php 92% from 13 tests

"Network Subsite User Registration" version 3.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin7,776 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP181,8284,6347,776

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity32.40
▷ Minimum class complexity3.00
▷ Maximum class complexity87.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods69
▷ Static methods22.90%
▷ Public methods6594.20%
▷ Protected methods00.00%
▷ Private methods45.80%
Functions199
▷ Named functions199100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected