84% pmpro-register-helper

Code Review | Custom User Profile Fields for User Registration & Member Frontend Profiles with Paid Memberships Pro

WordPress plugin Custom User Profile Fields for User Registration & Member Frontend Profiles with Paid Memberships Pro scored84%from 54 tests.

About plugin

  • Plugin page: pmpro-register-he...
  • Plugin version: 1.8.3
  • PHP compatiblity: 6.1.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Jun 12, 2015
  • Latest release: Mar 17, 2023
  • Number of updates: 31
  • Update frequency: every 91.9 days
  • Top authors: strangerstudios (74.19%)dlparker1005 (16.13%)andrewza (16.13%)

Code review

54 tests

User reviews

12 reviews

Install metrics

5,000+ active /129,455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.39ms] Passed 4 tests

This is a short check of server-side resources used by Custom User Profile Fields for User Registration & Member Frontend Profiles with Paid Memberships Pro
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.67 ▼0.43
Dashboard /wp-admin3.36 ▲0.0651.29 ▲1.71
Posts /wp-admin/edit.php3.47 ▲0.1252.94 ▲0.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.01 ▼12.11
Media Library /wp-admin/upload.php3.28 ▲0.0537.87 ▼1.19

Server storage [IO: ▲0.28MB] [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: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Custom User Profile Fields for User Registration & Member Frontend Profiles with Paid Memberships Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.45 ▲0.101.85 ▼0.0341.29 ▼8.06
Dashboard /wp-admin2,197 ▲235.63 ▲0.1190.54 ▼3.6538.54 ▼4.47
Posts /wp-admin/edit.php2,105 ▲52.01 ▲0.0141.89 ▲5.8836.29 ▼3.74
Add New Post /wp-admin/post-new.php1,528 ▲223.30 ▲0.29625.60 ▼65.3258.95 ▲2.18
Media Library /wp-admin/upload.php1,399 ▲24.18 ▲0.07103.89 ▼15.1442.52 ▼6.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pmpro-register-helper/shortcodes/pmpro_signup.php:159
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-register-helper/modules/register-form.php:152
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-register-helper/pmpro-register-helper.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-register-helper/modules/directory.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-register-helper/modules/profile.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-register-helper/modules/change-password.php:57
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pmpro-register-helper/pmpro-register-helper.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

pmpro-register-helper/pmpro-register-helper.php Passed 13 tests

The main PHP script in "Custom User Profile Fields for User Registration & Member Frontend Profiles with Paid Memberships Pro" version 1.8.3 is automatically included on every request by WordPress
90 characters long description:
Add custom form fields to membership checkout and user profiles with Paid Memberships Pro.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,983 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP74144892,774
CSS5127130
PO File1121355
Markdown115123
JavaScript1011

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 114)
Cyclomatic complexity
Average complexity per logical line of code0.78
Average class complexity277.00
▷ Minimum class complexity277.00
▷ Maximum class complexity277.00
Average method complexity16.33
▷ Minimum method complexity1.00
▷ Maximum method complexity114.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions65
▷ Named functions6193.85%
▷ Anonymous functions46.15%
Constants3
▷ Global constants3100.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