IP2Location Country Blocker

Blocks unwanted visitors from accessing your frontend (blog pages) or backend (admin area) by countries or proxy servers.

v2.42.1IP2LocationUpdated Added 30k+ installs84% rating0% support resolved
34
Score
295
Errors
88
Warnings
+0
Change

Category Scores

Security0
Repo86
Performance100
Maintainability56

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

383 findings

Security

289

6 issue groups

Maintainability

49

15 issue groups

I18n

41

4 issue groups

ERRORSecurityOutput Not EscapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$backend_status'.227
Category
Security
Occurrences
227
Severity
error

Sample message

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

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.36
Category
I18n
Occurrences
36
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 Unslash$_GET[$key] not unslashed before sanitization. Use wp_unslash() or similar23
Category
Security
Occurrences
23
Severity
warning

Sample message

$_GET[$key] not unslashed before sanitization. Use wp_unslash() or similar

WARNINGMaintainabilityMissing VersionResource 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.19
Category
Maintainability
Occurrences
19
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.

WARNINGSecurityInput Not SanitizedDetected usage of a non-sanitized input variable: $_FILES['restore_file']['tmp_name']18
Category
Security
Occurrences
18
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_FILES['restore_file']['tmp_name']

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

Sample message

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

WARNINGSecurityInput Not ValidatedDetected usage of a possibly undefined superglobal array index: $_FILES['restore_file']['error']. Check that the array index exists before using it.11
Category
Security
Occurrences
11
Severity
warning

Sample message

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

WARNINGSecurityMissingProcessing form data without nonce verification.6
Category
Security
Occurrences
6
Severity
warning

Sample message

Processing form data without nonce verification.

WARNINGSecurityRecommendedProcessing form data without nonce verification.4
Category
Security
Occurrences
4
Severity
warning

Sample message

Processing form data without nonce verification.

ERRORMaintainabilityOffloaded ContentFound call to wp_register_script() with external resource. Offloading scripts to your servers or any remote service is disallowed.2
Category
Maintainability
Occurrences
2
Severity
error

Sample message

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

Show 15 more
WARNINGMaintainabilityDiscouraged2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

The use of function set_time_limit() is discouraged

WARNINGMaintainabilityNon Prefixed Constant Found2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

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

ERRORMaintainabilityparse url parse url2
Category
Maintainability
Occurrences
2
Severity
error

Sample message

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

ERRORI18nNon Singular String Literal Domain2
Category
I18n
Occurrences
2
Severity
error

Sample message

The $domain parameter must be a single text string literal. Found: $plugin_name

ERRORI18nNon Singular String Literal Text2
Category
I18n
Occurrences
2
Severity
error

Sample message

The $text parameter must be a single text string literal. Found: 'Detected IP: <strong>' . esc_html($this->ip()) . '</strong>.'

WARNINGMaintainabilityerror log error log1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

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

ERRORMaintainabilityfile system operations fclose1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

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

ERRORMaintainabilityfile system operations fopen1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

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

ERRORMaintainabilityfile system operations fwrite1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

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

ERRORMaintainabilityunlink unlink1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

unlink() is discouraged. Use wp_delete_file() to delete a file.

ERRORI18nMixed Ordered Placeholders Text1
Category
I18n
Occurrences
1
Severity
error

Sample message

Multiple placeholders in translatable strings should be ordered. Mix of ordered and non-ordered placeholders found. Found: "%1$s, %2$s, %3$s, %4$s, %5s, %6s" in 'This is the secret code used to bypass all blockings to backend pages. It take precedence over all block settings configured. To bypass, you just need to append the %1$ssecret_code%2$s parameter with above value to the wp-login.php page. For example, https://www.example.com/wp-login.php%3$s?secret_code=1234567%4$s. If you add in %5s&action=emergency_stop%6s, both frontend and backend blocking will be disabled immediately.'.

ERRORMaintainabilitybadly named files1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

File and folder names must not contain spaces or special characters.

ERRORMaintainabilityfive star reviews detected1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

Linking directly to 5 stars reviews is not allowed.

WARNINGMaintainabilitymissing composer json file1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

The &quot;/vendor&quot; directory using composer exists, but &quot;composer.json&quot; file is missing.

ERRORMaintainabilitymissing direct file access protection1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

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

Score History

First score snapshot

v2.42.1

34

Latest

Findings
383
Errors
295
Warnings
88
Check
2.0.0

Related Plugins

100
User IP and Location

3k+ active installs

88
IP2Location Redirection

8k+ active installs

33
IP Location Block

10k+ active installs

25