JCH Optimize

This plugin automatically performs several front end optimizations to your site to boost performance and increase PageSpeed scores.

v5.1.4codealfaUpdated Added 4k+ installs88% rating
21
Score
953
Errors
133
Warnings
+0
Change

Category Scores

Security0
Repo75
Performance97
Maintainability0

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

1,086 findings

Maintainability

512

14 issue groups

Security

437

7 issue groups

I18n

106

4 issue groups

ERRORSecurityOutput Not EscapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"jch-optimize_settings[{$settingName}]"'.365
Category
Security
Occurrences
365
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"jch-optimize_settings[{$settingName}]"'.

ERRORMaintainabilityEcho FoundShort PHP opening tag used with echo; expected "<?php echo "jch-optimize_settings[{$settingName}]" ..." but found "<?= "jch-optimize_settings[{$settingName}]" ..."271
Category
Maintainability
Occurrences
271
Severity
error

Sample message

Short PHP opening tag used with echo; expected "<?php echo "jch-optimize_settings[{$settingName}]" ..." but found "<?= "jch-optimize_settings[{$settingName}]" ..."

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

Sample message

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

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

Sample message

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

WARNINGMaintainabilityNon Prefixed Variable FoundGlobal variables defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;$aAdvancedToggleIcons&quot;.47
Category
Maintainability
Occurrences
47
Severity
warning

Sample message

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

ERRORMaintainabilityNot AllowedUse of heredoc syntax (<<<) is not allowed; use standard strings or inline HTML instead41
Category
Maintainability
Occurrences
41
Severity
error

Sample message

Use of heredoc syntax (<<<) is not allowed; use standard strings or inline HTML instead

ERRORI18nNon Singular String Literal TextThe $text parameter must be a single text string literal. Found: $activeValue26
Category
I18n
Occurrences
26
Severity
error

Sample message

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

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.22
Category
I18n
Occurrences
22
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.

WARNINGSecuritywp redirect wp redirectwp_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.21
Category
Security
Occurrences
21
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.

WARNINGMaintainabilityNon Prefixed Constant FoundGlobal constants defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;JCH_CACHE_DIR&quot;.19
Category
Maintainability
Occurrences
19
Severity
warning

Sample message

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

Show 15 more
ERRORSecurityException Not Escaped19
Category
Security
Occurrences
19
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"/* Response returned status code: {$response->getStatusCode()} */"'.

ERRORSecurityUnsafe Printing Function18
Category
Security
Occurrences
18
Severity
error

Sample message

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

WARNINGMaintainabilityDiscouraged8
Category
Maintainability
Occurrences
8
Severity
warning

Sample message

The use of function ini_set() is discouraged

WARNINGMaintainabilityNon Prefixed Hookname Found6
Category
Maintainability
Occurrences
6
Severity
warning

Sample message

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

ERRORSecurityHeredoc Output Not Escaped6
Category
Security
Occurrences
6
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found interpolation in unescaped heredoc.

ERRORMaintainabilitydate date4
Category
Maintainability
Occurrences
4
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 Sanitized4
Category
Security
Occurrences
4
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_SERVER[&#039;HTTP_USER_AGENT&#039;]

WARNINGSecurityMissing Unslash4
Category
Security
Occurrences
4
Severity
warning

Sample message

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

WARNINGMaintainabilityerror log print r3
Category
Maintainability
Occurrences
3
Severity
warning

Sample message

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

WARNINGMaintainabilityprevent path disclosure error reporting3
Category
Maintainability
Occurrences
3
Severity
warning

Sample message

error_reporting() can lead to full path disclosure.

ERRORMaintainabilityfile system operations fclose3
Category
Maintainability
Occurrences
3
Severity
error

Sample message

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

ERRORMaintainabilityfile system operations rmdir3
Category
Maintainability
Occurrences
3
Severity
error

Sample message

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

ERRORMaintainabilityunlink unlink3
Category
Maintainability
Occurrences
3
Severity
error

Sample message

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

WARNINGI18nload plugin textdomain Found2
Category
I18n
Occurrences
2
Severity
warning

Sample message

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.

WARNINGMaintainabilityerror log set error handler2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

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

Score History

First score snapshot

v5.1.4

21

Latest

Findings
1,086
Errors
953
Warnings
133
Check
2.0.0

Related Plugins

DietPress

2k+ active installs

100
Disable Emojis (GDPR friendly)

60k+ active installs

100
Embed Optimizer

50k+ active installs

100
Image Placeholders

60k+ active installs

100
100