The Menu Swapper allows you to register custom theme locations and easily swap menus on individual Pages or Posts.
Category Scores
Issues to Review
Prioritized issue groups from the latest Plugin Check scan
Security
22
4 issue groups
Maintainability
8
5 issue groups
I18n
2
2 issue groups
Repo Compliance
2
2 issue groups
ERRORSecurityOutput Not EscapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$class'.15
- Category
- Security
- Occurrences
- 15
- Severity
- error
Sample message
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$class'.
WARNINGSecurityInput Not SanitizedDetected usage of a non-sanitized input variable: $_POST['mswp-swap-theme-loc']3
- Category
- Security
- Occurrences
- 3
- Severity
- warning
Sample message
Detected usage of a non-sanitized input variable: $_POST['mswp-swap-theme-loc']
WARNINGSecurityMissing Unslash$_POST['mswp-swap-theme-loc'] not unslashed before sanitization. Use wp_unslash() or similar3
- Category
- Security
- Occurrences
- 3
- Severity
- warning
Sample message
$_POST['mswp-swap-theme-loc'] not unslashed before sanitization. Use wp_unslash() or similar
ERRORMaintainabilitymissing direct file access protectionPHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;3
- Category
- Maintainability
- Occurrences
- 3
- Severity
- error
Sample message
PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;
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.2
- Category
- Maintainability
- Occurrences
- 2
- 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.
WARNINGI18nload plugin textdomain Foundload_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.1
- Category
- I18n
- Occurrences
- 1
- 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.
WARNINGMaintainabilityNon Prefixed Class FoundClasses declared by a theme/plugin should start with the theme/plugin prefix. Found: "Menu_Swapper".1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- warning
Sample message
Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: "Menu_Swapper".
WARNINGMaintainabilityerror log print rprint_r() found. Debug code should not normally be used in production.1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- warning
Sample message
print_r() found. Debug code should not normally be used in production.
WARNINGSecurityInput Not ValidatedDetected usage of a possibly undefined superglobal array index: $_POST['mswp-target-theme-loc']. Check that the array index exists before using it.1
- Category
- Security
- Occurrences
- 1
- Severity
- warning
Sample message
Detected usage of a possibly undefined superglobal array index: $_POST['mswp-target-theme-loc']. Check that the array index exists before using it.
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.1
- Category
- Maintainability
- Occurrences
- 1
- 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 3 moreShow less
ERRORRepo Complianceoutdated tested upto header1
- Category
- Repo Compliance
- Occurrences
- 1
- Severity
- error
Sample message
Tested up to: 6.7 < 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.
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.
WARNINGI18ntextdomain mismatch1
- Category
- I18n
- Occurrences
- 1
- Severity
- warning
Sample message
The "Text Domain" header in the plugin file does not match the slug. Found "menuswap", expected "menu-swapper".
Score History
First score snapshot
v1.2
58
Latest
- Findings
- 34
- Errors
- 20
- Warnings
- 14
- Check
- 2.0.0
| Scan | Score | Findings | Errors | Warnings | Plugin | Check |
|---|---|---|---|---|---|---|
| Latest | 58 | 34 | 20 | 14 | v1.2 | 2.0.0 |