Better Google Analytics

Track everything with Google Analytics (clicked links, emails opened, YouTube videos being watched, etc.). Includes real time Analytics dashboard.

v1.2.7digitalpointUpdated Added 2k+ installs84% rating
29
Score
376
Errors
869
Warnings
+0
Change

Category Scores

Security0
Repo91
Performance100
Maintainability28

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

1,245 findings

Security

766

8 issue groups

Maintainability

368

13 issue groups

I18n

102

4 issue groups

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

Sample message

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

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

Sample message

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

WARNINGSecurityRequest data is not unslashed$_COOKIE['_ga'] not unslashed before sanitization. Use wp_unslash() or similar123
Category
Security
Occurrences
123
Severity
warning

Sample message

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

WARNINGSecurityInput is not validatedDetected usage of a possibly undefined superglobal array index: $_COOKIE[$this->experimentId]. Check that the array index exists before using it.120
Category
Security
Occurrences
120
Severity
warning

Sample message

Detected usage of a possibly undefined superglobal array index: $_COOKIE[$this->experimentId]. Check that the array index exists before using it.

WARNINGSecurityInput is not sanitizedDetected usage of a non-sanitized input variable: $_COOKIE['_ga']111
Category
Security
Occurrences
111
Severity
warning

Sample message

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

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

Sample message

Processing form data without nonce verification.

WARNINGSecurityMissing nonce verificationProcessing form data without nonce verification.74
Category
Security
Occurrences
74
Severity
warning

Sample message

Processing form data without nonce verification.

ERRORI18nMissing Translators CommentA 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.48
Category
I18n
Occurrences
48
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.

ERRORI18nMissing Arg DomainMissing $domain parameter in function call to __().35
Category
I18n
Occurrences
35
Severity
error

Sample message

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

WARNINGMaintainabilityNot In FooterIn footer ($in_footer) is not set explicitly wp_enqueue_script; It is recommended to load scripts in the footer. Please set this value to `true` to load it in the footer, or explicitly `false` if it should be loaded in the header.22
Category
Maintainability
Occurrences
22
Severity
warning

Sample message

In footer ($in_footer) is not set explicitly wp_enqueue_script; It is recommended to load scripts in the footer. Please set this value to `true` to load it in the footer, or explicitly `false` if it should be loaded in the header.

Show 15 more
ERRORI18nText Domain Mismatch12
Category
I18n
Occurrences
12
Severity
error

Sample message

Mismatched text domain. Expected 'better-analytics' but got 'better_analytics'.

ERRORMaintainabilityMissing direct file access protection12
Category
Maintainability
Occurrences
12
Severity
error

Sample message

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

ERRORI18nUnordered Placeholders Text7
Category
I18n
Occurrences
7
Severity
error

Sample message

Multiple placeholders in translatable strings should be ordered. Expected "%1$s, %2$s", but got "%s, %s" in 'Fri%sday%s'.

WARNINGSecuritywp redirect wp redirect4
Category
Security
Occurrences
4
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.

ERRORMaintainabilitystrip tags strip tags4
Category
Maintainability
Occurrences
4
Severity
error

Sample message

strip_tags() is discouraged. Use the more comprehensive wp_strip_all_tags() instead.

ERRORMaintainabilityfile system operations readfile3
Category
Maintainability
Occurrences
3
Severity
error

Sample message

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

WARNINGMaintainabilityMissing Version3
Category
Maintainability
Occurrences
3
Severity
warning

Sample message

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

ERRORMaintainabilitydate date2
Category
Maintainability
Occurrences
2
Severity
error

Sample message

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

WARNINGMaintainabilityNon-prefixed hook name2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

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

WARNINGMaintainabilityerror log error log2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

error_log() found. Debug code should not normally be used in production.

ERRORMaintainabilityrand mt rand2
Category
Maintainability
Occurrences
2
Severity
error

Sample message

mt_rand() is discouraged. Use the far less predictable wp_rand() instead.

WARNINGMaintainabilityDirect Query1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Use of a direct database call is discouraged.

WARNINGMaintainabilityNo Caching1
Category
Maintainability
Occurrences
1
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 prepared1
Category
Security
Occurrences
1
Severity
error

Sample message

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

WARNINGMaintainabilityerror log print r1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

print_r() found. Debug code should not normally be used in production.

External Connections

Not analyzed yet.

Score History

First score snapshot

v1.2.7

29

Latest

Findings
1,245
Errors
376
Warnings
869
Check
2.0.0

Relationship Map

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

29 nodes

Related Plugins

99
Machete

7k+ active installs

99
Search Analytics for WP

3k+ active installs

99
Web Worker Offloading

10k+ active installs

99
98