57% userplus

Code Review | User registration & user profile – UserPlus

WordPress plugin User registration & user profile – UserPlus scored57%from 54 tests.

About plugin

  • Plugin page: userplus
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.8.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2017
  • Latest release: Nov 28, 2017
  • Number of updates: 13
  • Update frequency: every 21.2 days
  • Top authors: userplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,158 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.51MB] [CPU: ▼35.30ms] Passed 4 tests

Analyzing server-side resources used by User registration & user profile – UserPlus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2941.35 ▼9.26
Dashboard /wp-admin3.43 ▲0.1326.32 ▼27.08
Posts /wp-admin/edit.php3.43 ▲0.0829.48 ▼26.01
Add New Post /wp-admin/post-new.php3.43 ▼2.4529.42 ▼78.86
Media Library /wp-admin/upload.php3.43 ▲0.2031.45 ▼9.18
UserPlus /wp-admin/admin.php?page=userplus3.4332.00
Forms /wp-admin/edit.php?post_type=userplus_form3.4330.61

Server storage [IO: ▲2.41MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 66 new files
Database: no new tables, 10 new options
New WordPress options
userplus_default_login
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
userplus_default_profile
theysaidso_admin_options
userplus_pages
userplus

Browser metrics Passed 4 tests

An overview of browser requirements for User registration & user profile – UserPlus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21214.14 ▼0.2110.80 ▲9.1739.68 ▲0.54
Dashboard /wp-admin2,257 ▲775.80 ▲0.1891.41 ▼0.6644.13 ▲2.23
Posts /wp-admin/edit.php2,168 ▲652.29 ▲0.3243.00 ▲3.4139.11 ▲3.97
Add New Post /wp-admin/post-new.php1,569 ▲4323.22 ▼0.21703.85 ▲17.4238.63 ▼15.60
Media Library /wp-admin/upload.php1,467 ▲674.46 ▲0.26101.25 ▼13.3044.35 ▼5.72
UserPlus /wp-admin/admin.php?page=userplus1,4212.1036.8074.13
Forms /wp-admin/edit.php?post_type=userplus_form1,8742.2939.3437.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_theysaidso_widget
    • userplus_default_login
    • userplus
    • theysaidso_admin_options
    • userplus_default_profile
    • db_upgraded
    • userplus_pages
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=userplus_form
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/userplus/admin/templates/form/userplus-admin-form-shortcode.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/userplus/templates/edit.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/userplus/class-userplus.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/userplus/admin/templates/form/userplus-admin-form-type.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/userplus/admin/dashboard/email_template.php:10
    • > PHP Notice
      Undefined variable: object in wp-content/plugins/userplus/admin/templates/form/userplus-admin-form-shortcode.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/userplus/templates/register.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/userplus/admin/templates/form/userplus-admin-form-builder.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/userplus/templates/login.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/userplus/functions/hook-action.php:3
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/userplus/templates/profile.php on line 1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=userplus
    • > Network (severe)
    wp-content/plugins/userplus/admin/assets/css/ionicons.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=userplus
    • > Network (severe)
    wp-content/plugins/userplus/admin/assets/js/app.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=userplus
    • > Network (severe)
    wp-content/plugins/userplus/admin/assets/fonts/fontawesome-webfont.woff?v=4.0.3 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=userplus
    • > Network (severe)
    wp-content/plugins/userplus/admin/assets/fonts/fontawesome-webfont.ttf?v=4.0.3 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt might help

userplus/userplus.php Passed 13 tests

The main PHP script in "User registration & user profile – UserPlus" version 2.0 is automatically included on every request by WordPress
64 characters long description:
The easiest way to create beautiful user profiles with WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected12,952 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
CSS897698,013
PHP31465252,308
JavaScript76492231,981
SVG200650

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.45
▷ Minimum class complexity3.00
▷ Maximum class complexity53.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods65
▷ Static methods00.00%
▷ Public methods6498.46%
▷ Protected methods11.54%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/profiledefault.png24.40KB7.94KB▼ 67.46%