WP Counter

WP Counter is a simple visitor counter of your site.

v1.2HarunUpdated Added 800 installs80% rating
36
Score
86
Errors
43
Warnings
+0
Change

Category Scores

Security0
Repo94
Performance100
Maintainability60

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

129 findings

Maintainability

62

13 issue groups

Security

54

8 issue groups

I18n

12

2 issue groups

Repo Compliance

1

1 issue group

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

Sample message

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

ERRORMaintainabilitydate datedate() is affected by runtime timezone changes which can cause date/time to be incorrectly displayed. Use gmdate() instead.18
Category
Maintainability
Occurrences
18
Severity
error

Sample message

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

ERRORI18nText Domain MismatchMismatched text domain. Expected 'wp-counter' but got 'wpcounter'.11
Category
I18n
Occurrences
11
Severity
error

Sample message

Mismatched text domain. Expected 'wp-counter' but got 'wpcounter'.

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

Sample message

Use of a direct database call is discouraged.

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

Sample message

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

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

Sample message

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

ERRORSecuritySQL query is not preparedUse placeholders and $wpdb->prepare(); found $sql7
Category
Security
Occurrences
7
Severity
error

Sample message

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

ERRORMaintainabilityMissing direct file access protectionPHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;7
Category
Maintainability
Occurrences
7
Severity
error

Sample message

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

WARNINGMaintainabilityNon-prefixed functionFunctions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "getCurrent".5
Category
Maintainability
Occurrences
5
Severity
warning

Sample message

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

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

Sample message

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

Show 14 more
WARNINGMaintainabilitytrademarked term3
Category
Maintainability
Occurrences
3
Severity
warning

Sample message

The plugin name includes a restricted term. Your chosen plugin name - "WP Counter" - contains the restricted term "wp" which cannot be used at all in your plugin name.

WARNINGSecurityInput is not sanitized2
Category
Security
Occurrences
2
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_SERVER['REMOTE_ADDR']

WARNINGSecurityInput is not validated2
Category
Security
Occurrences
2
Severity
warning

Sample message

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

WARNINGSecurityRequest data is not unslashed2
Category
Security
Occurrences
2
Severity
warning

Sample message

$_SERVER['REMOTE_ADDR'] not unslashed before sanitization. Use wp_unslash() or similar

WARNINGMaintainabilityMissing Version2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

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

WARNINGMaintainabilityNot In Footer2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

In footer ($in_footer) is not set explicitly wp_register_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.

ERRORMaintainabilityOffloaded Content1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

Found call to wp_register_script() with external resource. Offloading scripts to your servers or any remote service is disallowed.

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 39.

WARNINGSecurityInterpolated SQL is not prepared1
Category
Security
Occurrences
1
Severity
warning

Sample message

Use placeholders and $wpdb->prepare(); found interpolated variable $table_name at "SELECT COUNT(*) FROM $table_name WHERE ip= %s AND visit_date=%s"

ERRORMaintainabilitytimezone change date default timezone set1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

Using date_default_timezone_set() and similar isn't allowed, instead use WP internal timezone support.

WARNINGMaintainabilityNon-prefixed constant1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Global constants defined by a theme/plugin should start with the theme/plugin prefix. Found: "DF".

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

Sample message

Tested up to: 6.2 < 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.

WARNINGI18ntextdomain mismatch1
Category
I18n
Occurrences
1
Severity
warning

Sample message

The "Text Domain" header in the plugin file does not match the slug. Found "wpcounter", expected "wp-counter".

ERRORMaintainabilitytrunk stable tag1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

Incorrect Stable Tag. It's recommended not to use "Stable Tag: trunk". Your Stable Tag is meant to be the stable version of your plugin and it needs to be exactly the same with the Version in your main plugin file's header. Any mismatch can prevent users from downloading the correct plugin files from WordPress.org.

External Connections

Potential connections found in static code analysis.

5 domains

Outbound calls

19

External assets

1

Incoming endpoints

0

Notable Domains

learn24bd.com13 · outbound
php-fig.org2 · outbound
getcomposer.org1 · outbound

Platform / Reference Domains

github.com2 · platform/reference

External Asset Domains

cdnjs.cloudflare.com2 · asset + outbound

Incoming Endpoints

No public endpoints detected.

Score History

First score snapshot

v1.2

36

Latest

Findings
129
Errors
86
Warnings
43
Check
2.0.0

Relationship Map

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

29 nodes

Related Plugins

Counting Number Block

2k+ active installs

100
Post View Count

4k+ active installs

99
Counter-Hits

1k+ active installs

98
Date counter

1k+ active installs

95