GD Security Headers

Configure various security-related HTTP headers, including CSP, XSS, Referrer Policy and more.

v1.9Milan PetrovicUpdated Added 1k+ installs80% rating
25
Score
407
Errors
521
Warnings
+0
Change

Category Scores

Security0
Repo97
Performance100
Maintainability0

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

928 findings

Security

465

9 issue groups

Maintainability

354

14 issue groups

I18n

68

2 issue groups

ERRORSecurityOutput is not escapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"<li><strong>Group:</strong> $group - ( "'.266
Category
Security
Occurrences
266
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"<li><strong>Group:</strong> $group - ( "'.

WARNINGMaintainabilityNon-prefixed functionFunctions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: &quot;d4p_add_action&quot;.127
Category
Maintainability
Occurrences
127
Severity
warning

Sample message

Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: &quot;d4p_add_action&quot;.

WARNINGMaintainabilityNon-prefixed global variableGlobal variables defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;$_available&quot;.97
Category
Maintainability
Occurrences
97
Severity
warning

Sample message

Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;$_available&quot;.

WARNINGSecurityNonce verification recommendedProcessing form data without nonce verification.71
Category
Security
Occurrences
71
Severity
warning

Sample message

Processing form data without nonce verification.

ERRORI18nText Domain MismatchMismatched text domain. Expected 'gd-security-headers' but got "d4plib".59
Category
I18n
Occurrences
59
Severity
error

Sample message

Mismatched text domain. Expected 'gd-security-headers' but got "d4plib".

WARNINGSecurityRequest data is not unslashed$_GET[&#039;action&#039;] not unslashed before sanitization. Use wp_unslash() or similar40
Category
Security
Occurrences
40
Severity
warning

Sample message

$_GET[&#039;action&#039;] not unslashed before sanitization. Use wp_unslash() or similar

WARNINGSecurityInput is not sanitizedDetected usage of a non-sanitized input variable: $_FILES[&#039;import_file&#039;][&#039;tmp_name&#039;]38
Category
Security
Occurrences
38
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_FILES[&#039;import_file&#039;][&#039;tmp_name&#039;]

WARNINGMaintainabilityNon-prefixed classClasses declared by a theme/plugin should start with the theme/plugin prefix. Found: &quot;d4pCheckboxRadioWalker&quot;.32
Category
Maintainability
Occurrences
32
Severity
warning

Sample message

Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: &quot;d4pCheckboxRadioWalker&quot;.

WARNINGMaintainabilityNon-prefixed constantGlobal constants defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;D4PLIB_CACERT_PATH&quot;.17
Category
Maintainability
Occurrences
17
Severity
warning

Sample message

Global constants defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;D4PLIB_CACERT_PATH&quot;.

WARNINGSecurityInput is not validatedDetected usage of a possibly undefined superglobal array index: $_FILES[&#039;import_file&#039;][&#039;tmp_name&#039;]. Check that the array index exists before using it.17
Category
Security
Occurrences
17
Severity
warning

Sample message

Detected usage of a possibly undefined superglobal array index: $_FILES[&#039;import_file&#039;][&#039;tmp_name&#039;]. Check that the array index exists before using it.

Show 15 more
ERRORMaintainabilityMissing direct file access protection17
Category
Maintainability
Occurrences
17
Severity
error

Sample message

PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;

WARNINGMaintainabilityDynamic hook name11
Category
Maintainability
Occurrences
11
Severity
warning

Sample message

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: &quot;$this-&gt;base.&#039;_&#039;.$this-&gt;scope.&#039;_settings_get&#039;&quot;.

WARNINGMaintainabilityDirect Query9
Category
Maintainability
Occurrences
9
Severity
warning

Sample message

Use of a direct database call is discouraged.

WARNINGMaintainabilityNo Caching9
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().

ERRORSecuritySQL query is not prepared9
Category
Security
Occurrences
9
Severity
error

Sample message

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

WARNINGMaintainabilityNon-prefixed hook name9
Category
Maintainability
Occurrences
9
Severity
warning

Sample message

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: &quot;check_ajax_referer&quot;.

WARNINGSecuritywp redirect wp redirect9
Category
Security
Occurrences
9
Severity
warning

Sample message

wp_redirect() found. Using wp_safe_redirect(), along with the &quot;allowed_redirect_hosts&quot; 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.

ERRORI18nMissing Translators Comment9
Category
I18n
Occurrences
9
Severity
error

Sample message

A function call to __() with texts containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

WARNINGSecurityMissing nonce verification8
Category
Security
Occurrences
8
Severity
warning

Sample message

Processing form data without nonce verification.

ERRORSecurityDatabase parameter is not escaped7
Category
Security
Occurrences
7
Severity
error

Sample message

Unescaped parameter $query used in $wpdb->get_results()\n$query used without escaping.

ERRORMaintainabilitydate date6
Category
Maintainability
Occurrences
6
Severity
error

Sample message

date() is affected by runtime timezone changes which can cause date/time to be incorrectly displayed. Use gmdate() instead.

ERRORMaintainabilityfile system operations fclose5
Category
Maintainability
Occurrences
5
Severity
error

Sample message

File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fclose().

ERRORMaintainabilityfile system operations fopen5
Category
Maintainability
Occurrences
5
Severity
error

Sample message

File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fopen().

ERRORMaintainabilityfile system operations fwrite5
Category
Maintainability
Occurrences
5
Severity
error

Sample message

File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fwrite().

ERRORMaintainabilityparse url parse url5
Category
Maintainability
Occurrences
5
Severity
error

Sample message

parse_url() is discouraged because of inconsistency in the output across PHP versions; use wp_parse_url() instead.

External Connections

Not analyzed yet.

Score History

First score snapshot

v1.9

25

Latest

Findings
928
Errors
407
Warnings
521
Check
2.0.0

Relationship Map

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

29 nodes

Related Plugins

HTTP Security Header

1k+ active installs

99
Auto SRI

500 active installs

92
Security Header Generator

500 active installs

87
68
GD bbPress Tools

1k+ active installs

43