Cookies and Content Security Policy

Be fully GDPR and CCPA compliant through Content Security Policy. Blocks cookies and unwanted external content.

v2.40Johan Jonk StenströmUpdated 2026-05-20Added Mar 7, 202010k+ installs98% rating0% support resolved
35
Score
261
Errors
412
Warnings
+0
Change

Category Scores

Security0
Repo89
Performance100
Maintainability59

Top Issues by Category

security462
maintainability164
i18n45

Issues Details

673 issues found in latest scan

ERROR194
WordPress.Security.EscapeOutput.OutputNotEscaped

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

WARNING137
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

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

WARNING77
WordPress.Security.ValidatedSanitizedInput.MissingUnslash

$_COOKIE['cookies_and_content_security_policy'] not unslashed before sanitization. Use wp_unslash() or similar

WARNING76
WordPress.Security.ValidatedSanitizedInput.InputNotValidated

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

WARNING53
WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

Detected usage of a non-sanitized input variable: $_COOKIE['cookies_and_content_security_policy']

WARNING33
WordPress.Security.NonceVerification.Missing

Processing form data without nonce verification.

ERROR24
WordPress.WP.I18n.TooManyFunctionArgs

Too many parameters passed to function "__()". Expected: 2 parameters, received: 3

ERROR14
WordPress.Security.EscapeOutput.UnsafePrintingFunction

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

WARNING9
WordPress.Security.NonceVerification.Recommended

Processing form data without nonce verification.

WARNING7
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound

Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "body_class_cacsp_front".

WARNING6
WordPress.DB.DirectDatabaseQuery.DirectQuery

Use of a direct database call is discouraged.

WARNING5
WordPress.DB.DirectDatabaseQuery.NoCaching

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

ERROR5
WordPress.WP.I18n.NonSingularStringLiteralText

The $text parameter must be a single text string literal. Found: get_cacsp_options( 'cacsp_not_allowed_button', true, __( 'Contact the administrator', 'cookies-and-content-security-policy' ), true )

ERROR5
WordPress.WP.I18n.TextDomainMismatch

Mismatched text domain. Expected 'cookies-and-content-security-policy' but got 'cacspMessages'.

ERROR4
WordPress.WP.I18n.MissingTranslatorsComment

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.

ERROR4
WordPress.WP.I18n.UnorderedPlaceholdersText

Multiple placeholders in translatable strings should be ordered. Expected "%1$20d, %2$3F", but got "%20d, %3F" in 'https://wordpress.org/plugins/cookies-and-content-security-policy/#how%20do%20i%20translate%20in%20polylang%3F'.

ERROR4
missing_direct_file_access_protection

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

WARNING3
PluginCheck.Security.DirectDB.UnescapedDBParameter

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

WARNING3
WordPress.DB.PreparedSQL.InterpolatedNotPrepared

Use placeholders and $wpdb->prepare(); found interpolated variable {$table_name} at "DELETE FROM {$table_name} WHERE time >= %s AND time <= %s"

WARNING2
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "active_plugins".

ERROR2
WordPress.WP.I18n.MissingArgDomain

Missing $domain parameter in function call to __().

WARNING1
PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound

load_plugin_textdomain() has been discouraged since WordPress version 4.6. When your plugin is hosted on WordPress.org, you no longer need to manually include this function call for translations under your plugin slug. WordPress will automatically load the translations for you as needed.

ERROR1
WordPress.WP.AlternativeFunctions.file_system_operations_fclose

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

ERROR1
WordPress.WP.AlternativeFunctions.file_system_operations_fopen

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

ERROR1
WordPress.WP.AlternativeFunctions.file_system_operations_fwrite

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

Latest Snapshot

Findings

673

Errors

261

Warnings

412

Score History

First score snapshot

First scan completed Jun 20, 2026

v2.40 · Plugin Check 2.0.0 · Model 2026.06-mvp-static-v2

Jun 20, 2026

v2.40

35

Latest

Findings
673
Errors
261
Warnings
412
Plugin Check
2.0.0
Model
2026.06-mvp-static-v2

Related Plugins