Menu Swapper

The Menu Swapper allows you to register custom theme locations and easily swap menus on individual Pages or Posts.

v1.2sevensparkUpdated Added 3k+ installs94% rating
58
Score
20
Errors
14
Warnings
+0
Change

Category Scores

Security30
Repo89
Performance100
Maintainability91

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

34 findings

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 more
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

Related Plugins

Breadcrumb Block

3k+ active installs

100
Menu In Post

2k+ active installs

100
Options for Twenty Twenty

3k+ active installs

100
100
Options for Twenty Seventeen

9k+ active installs

99