Role Based Redirect

Redirect users after login/logout by role. Optionally hide admin bar and block dashboard access for selected roles.

v1.6Yasar KhalifaUpdated Added 2k+ installs96% rating
40
Score
20
Errors
96
Warnings
+0
Change

Category Scores

Security0
Repo94
Performance100
Maintainability80

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

116 findings

Maintainability

66

6 issue groups

Security

49

10 issue groups

Repo Compliance

1

1 issue group

WARNINGMaintainabilityNon-prefixed global variableGlobal variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$adminbar".43
Category
Maintainability
Occurrences
43
Severity
warning

Sample message

Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$adminbar".

WARNINGSecurityRequest data is not unslashed$_POST['adminbar'] not unslashed before sanitization. Use wp_unslash() or similar16
Category
Security
Occurrences
16
Severity
warning

Sample message

$_POST['adminbar'] not unslashed before sanitization. Use wp_unslash() or similar

WARNINGMaintainabilityDirect QueryUse of a direct database call is discouraged.10
Category
Maintainability
Occurrences
10
Severity
warning

Sample message

Use of a direct database call is discouraged.

WARNINGSecurityInput is not validatedDetected usage of a possibly undefined superglobal array index: $_POST['role_userrole']. Check that the array index exists before using it.10
Category
Security
Occurrences
10
Severity
warning

Sample message

Detected usage of a possibly undefined superglobal array index: $_POST['role_userrole']. Check that the array index exists before using it.

WARNINGMaintainabilityNo CachingDirect database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().9
Category
Maintainability
Occurrences
9
Severity
warning

Sample message

Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().

ERRORSecurityOutput is not escapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$fetchlogintext'.8
Category
Security
Occurrences
8
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$fetchlogintext'.

ERRORSecurityUnsafe printing functionAll output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.6
Category
Security
Occurrences
6
Severity
error

Sample message

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.

ERRORMaintainabilityLocalhost URL foundDo not use Localhost/127.0.0.1/*.local in your code. Found: http://localhost/2
Category
Maintainability
Occurrences
2
Severity
error

Sample message

Do not use Localhost/127.0.0.1/*.local in your code. Found: http://localhost/

ERRORSecurityDatabase parameter is not escapedUnescaped parameter $key used in $wpdb->get_results()\n$key assigned unsafely at line 114.2
Category
Security
Occurrences
2
Severity
error

Sample message

Unescaped parameter $key used in $wpdb->get_results()\n$key assigned unsafely at line 114.

WARNINGSecurityInterpolated SQL is not preparedUse placeholders and $wpdb->prepare(); found interpolated variable $key at "SELECT * FROM {$wpdb->prefix}rbrurls_redirect WHERE `role_type` = '$key'"2
Category
Security
Occurrences
2
Severity
warning

Sample message

Use placeholders and $wpdb->prepare(); found interpolated variable $key at "SELECT * FROM {$wpdb->prefix}rbrurls_redirect WHERE `role_type` = '$key'"

Show 7 more
WARNINGSecurityInput is not sanitized2
Category
Security
Occurrences
2
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_POST['url_redirect']

WARNINGSecurityDatabase parameter is not escaped1
Category
Security
Occurrences
1
Severity
warning

Sample message

Unescaped parameter $table_name used in $wpdb->get_var()\n$table_name assigned unsafely at line 107.

WARNINGMaintainabilitySchema Change1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Attempting a database schema change is discouraged.

ERRORSecuritySQL query is not prepared1
Category
Security
Occurrences
1
Severity
error

Sample message

Use placeholders and $wpdb->prepare(); found $sql

WARNINGSecuritywp redirect wp redirect1
Category
Security
Occurrences
1
Severity
warning

Sample message

wp_redirect() found. Using wp_safe_redirect(), along with the "allowed_redirect_hosts" filter if needed, can help avoid any chances of malicious redirects within code. It is also important to remember to call exit() after a redirect so that no other unwanted code is executed.

WARNINGMaintainabilityMissing Version1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Resource version not set in call to wp_register_style(). This means new versions of the style may not always be loaded due to browser caching.

ERRORRepo Complianceoutdated tested upto header1
Category
Repo Compliance
Occurrences
1
Severity
error

Sample message

Tested up to: 6.9 < 7.0. The "Tested up to" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress.

External Connections

Not analyzed yet.

Score History

First score snapshot

v1.6

40

Latest

Findings
116
Errors
20
Warnings
96
Check
2.0.0

Relationship Map

Author, categories, issues, domains, and nearby plugins.

29 nodes

Related Plugins

Hide Admin Toolbar

9k+ active installs

98
Hide This

2k+ active installs

98
Blogger To WordPress

3k+ active installs

94
88