Surge is a very simple and fast page caching plugin for WordPress.
Category Scores
Issues to Review
Prioritized issue groups from the latest Plugin Check scan
Maintainability
73
13 issue groups
Security
17
4 issue groups
Repo Compliance
2
2 issue groups
I18n
1
1 issue group
WARNINGMaintainabilityNon Prefixed Variable FoundGlobal variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$anchor".29
- Category
- Maintainability
- Occurrences
- 29
- Severity
- warning
Sample message
Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$anchor".
ERRORMaintainabilitymissing direct file access protectionPHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;10
- Category
- Maintainability
- Occurrences
- 10
- Severity
- error
Sample message
PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;
ERRORMaintainabilityfile system operations fcloseFile operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fclose().8
- Category
- Maintainability
- Occurrences
- 8
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fclose().
ERRORMaintainabilityunlink unlinkunlink() is discouraged. Use wp_delete_file() to delete a file.7
- Category
- Maintainability
- Occurrences
- 7
- Severity
- error
Sample message
unlink() is discouraged. Use wp_delete_file() to delete a file.
WARNINGSecurityInput Not ValidatedDetected usage of a possibly undefined superglobal array index: $_SERVER['REQUEST_METHOD']. Check that the array index exists before using it.6
- Category
- Security
- Occurrences
- 6
- Severity
- warning
Sample message
Detected usage of a possibly undefined superglobal array index: $_SERVER['REQUEST_METHOD']. Check that the array index exists before using it.
WARNINGSecurityInput Not SanitizedDetected usage of a non-sanitized input variable: $_SERVER['HTTP_HOST']5
- Category
- Security
- Occurrences
- 5
- Severity
- warning
Sample message
Detected usage of a non-sanitized input variable: $_SERVER['HTTP_HOST']
WARNINGSecurityMissing Unslash$_SERVER['HTTP_HOST'] not unslashed before sanitization. Use wp_unslash() or similar5
- Category
- Security
- Occurrences
- 5
- Severity
- warning
Sample message
$_SERVER['HTTP_HOST'] not unslashed before sanitization. Use wp_unslash() or similar
ERRORMaintainabilityfile system operations fwriteFile operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fwrite().5
- Category
- Maintainability
- Occurrences
- 5
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fwrite().
ERRORMaintainabilityfile system operations fopenFile operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fopen().4
- Category
- Maintainability
- Occurrences
- 4
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fopen().
ERRORMaintainabilityfile system operations freadFile operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fread().4
- Category
- Maintainability
- Occurrences
- 4
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fread().
Show 10 moreShow less
WARNINGMaintainabilityABSPATHDetected1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- warning
Sample message
Writing files using ABSPATH may be problematic. Consider using wp_upload_dir() instead if storing user data or generated files.
ERRORMaintainabilityPlugin Directory Write1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- error
Sample message
Plugin folders are deleted when upgraded. Do not save data to the plugin folder using copy(). Detected usage of constant WP_CONTENT_DIR. Use wp_upload_dir() to get the uploads directory path or save to the database instead.
ERRORSecurityOutput Not Escaped1
- Category
- Security
- Occurrences
- 1
- Severity
- error
Sample message
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'stream_get_contents'.
ERRORMaintainabilityfile system operations is writable1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: is_writable().
ERRORMaintainabilityfile system operations rmdir1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: rmdir().
ERRORMaintainabilityparse url parse url1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- error
Sample message
parse_url() is discouraged because of inconsistency in the output across PHP versions; use wp_parse_url() instead.
ERRORMaintainabilityrename rename1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- error
Sample message
rename() is discouraged. Use WP_Filesystem::move() to rename a file.
ERRORI18nMissing Arg Domain1
- Category
- I18n
- Occurrences
- 1
- Severity
- error
Sample message
Missing $domain parameter in function call to __().
ERRORRepo Complianceplugin header no license1
- Category
- Repo Compliance
- Occurrences
- 1
- Severity
- error
Sample message
Missing "License" in Plugin Header. Please update your Plugin Header with a valid GPLv2 (or later) compatible license.
WARNINGRepo Complianceplugin header nonexistent domain path1
- Category
- Repo Compliance
- Occurrences
- 1
- Severity
- warning
Sample message
The "Domain Path" header in the plugin file must point to an existing folder. Found: "languages"
Score History
First score snapshot
v1.2.1
60
Latest
- Findings
- 93
- Errors
- 46
- Warnings
- 47
- Check
- 2.0.0
| Scan | Score | Findings | Errors | Warnings | Plugin | Check |
|---|---|---|---|---|---|---|
| Latest | 60 | 93 | 46 | 47 | v1.2.1 | 2.0.0 |