74% user-registration

Code Review | User Registration - Custom Registration Form, Login Form And User Profile For WordPress

WordPress plugin User Registration - Custom Registration Form, Login Form And User Profile For WordPress scored74%from 54 tests.

About plugin

  • Plugin page: user-registration
  • Plugin version: 3.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Jul 6, 2017
  • Latest release: Nov 10, 2023
  • Number of updates: 144
  • Update frequency: every 16.2 days
  • Top authors: wpeverest (57.64%)wpeverestdev (43.06%)

Code review

54 tests

User reviews

618 reviews

Install metrics

60,000+ active /2,381,339 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.16MB] [CPU: ▲31.30ms] Passed 4 tests

An overview of server-side resources used by User Registration - Custom Registration Form, Login Form And User Profile For WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.21 ▲2.7572.20 ▲32.94
Dashboard /wp-admin6.61 ▲3.3076.54 ▲29.52
Posts /wp-admin/edit.php6.66 ▲3.3082.25 ▲35.16
Add New Post /wp-admin/post-new.php9.22 ▲3.33113.22 ▲27.57
Media Library /wp-admin/upload.php6.52 ▲3.2971.46 ▲39.88
Tools /wp-admin/admin.php?page=user-registration-status6.5763.65
Add New /wp-admin/admin.php?page=add-new-registration9.85426.72
Settings /wp-admin/admin.php?page=user-registration-settings7.1272.31
All Forms /wp-admin/admin.php?page=user-registration6.7178.68
Extensions /wp-admin/admin.php?page=user-registration-addons6.8386.86

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 652 new files
Database: 1 new table, 20 new options
New tables
wp_user_registration_sessions
New WordPress options
user_registration_activated
db_upgraded
user_registration_db_version
can_compress_scripts
widget_recent-posts
user_registration_admin_notices
user_registration_enable_auto_generated_password_email
widget_recent-comments
widget_theysaidso_widget
user_registration_captcha_setting_invisible_recaptcha_v2
...

Browser metrics Passed 4 tests

Checking browser requirements for User Registration - Custom Registration Form, Login Form And User Profile For WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,121 ▲35913.77 ▼0.607.85 ▲6.1640.66 ▼5.57
Dashboard /wp-admin2,494 ▲3145.33 ▼0.30109.00 ▲17.8889.09 ▲49.45
Posts /wp-admin/edit.php2,251 ▲1482.45 ▲0.4432.35 ▼1.6331.49 ▼2.85
Add New Post /wp-admin/post-new.php6,493 ▲4,96730.46 ▲7.681,025.33 ▲351.7339.09 ▼20.59
Media Library /wp-admin/upload.php1,546 ▲1494.55 ▲0.40105.07 ▲4.3142.86 ▲1.03
Tools /wp-admin/admin.php?page=user-registration-status1,0283.2587.5129.61
Add New /wp-admin/admin.php?page=add-new-registration2,4674.8271.5150.91
Settings /wp-admin/admin.php?page=user-registration-settings1,6313.8579.5554.08
All Forms /wp-admin/admin.php?page=user-registration1,4513.2550.5036.26
Extensions /wp-admin/admin.php?page=user-registration-addons2,2443.2244.7151.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_user_registration_sessions
  • Zombie WordPress options detected upon uninstall: 19 options
    • user_registration_migration_version
    • user_registration_default_form_page_id
    • user_registration_db_version
    • user_registration_captcha_setting_recaptcha_version
    • user_registration_enable_auto_generated_password_email
    • widget_theysaidso_widget
    • user_registration_admin_notices
    • theysaidso_admin_options
    • can_compress_scripts
    • ur_profile_picture_migrated
    • ...

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      file_get_contents(wp-content/plugins/user-registration/composer.json): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/user-registration/tests/wp-tests-config.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/user-registration/includes/abstracts/abstract-ur-list-table.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/user-registration/tests/phpunit/../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/user-registration/tests/phpunit/bootstrap.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/user-registration/tests/wp-tests-config.php on line 7
    • > PHP Warning
      require_once(wp-content/plugins/user-registration/tests/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/user-registration/tests/wp-config.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/user-registration/tests/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/user-registration/tests/wp-config.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-registration/includes/abstracts/abstract-ur-list-table.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/user-registration/tests/wp-tests-config.php on line 7
    • > PHP Warning
      require_once(wp-content/plugins/user-registration/tests/phpunit/../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/user-registration/tests/phpunit/bootstrap.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/user-registration/includes/abstracts/abstract-ur-list-table.php on line 9

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: registration, user registration, login form, user profile, registration form

user-registration/user-registration.php Passed 13 tests

The main PHP script in "User Registration - Custom Registration Form, Login Form And User Profile For WordPress" version 3.1.1 is automatically included on every request by WordPress
60 characters long description:
Drag and Drop user registration form and login form builder.

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin91,390 lines of code in 543 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2108,3604,36750,727
PHP2015,7179,29925,901
Sass391,5361718,941
CSS373441825,069
JSON200422
SVG5101242
XML33088

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity23.65
▷ Minimum class complexity1.00
▷ Maximum class complexity241.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes123
▷ Abstract classes108.13%
▷ Concrete classes11391.87%
▷ Final classes10.88%
Methods918
▷ Static methods26829.19%
▷ Public methods79886.93%
▷ Protected methods454.90%
▷ Private methods758.17%
Functions236
▷ Named functions21490.68%
▷ Anonymous functions229.32%
Constants52
▷ Global constants3669.23%
▷ Class constants1630.77%
▷ Public constants16100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
86 PNG files occupy 0.79MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
assets/extensions-json/sections/images/stripe.png10.64KB10.64KB0.00%
assets/css/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
assets/extensions-json/sections/images/customize-my-account.png5.38KB2.54KB▼ 52.88%
assets/images/login_form.png17.40KB5.98KB▼ 65.62%