Remove WP Armour from dashboard and admin menu

When you install and activate a free version of WP Armour – Honeypot Anti Spam plugin by Dnesscarkey it automatically adds one more useless widget to the WordPress dashboard which does nothing but advertises the premium version of the plugin. Also the “Wp Armour” admin page does not give you useful insights in statistics nor any configuration options which you would use on a regular basis.

WP Armour Anti Spam Statistics - useless dashboard widget which comes from the free version of this plugin
A screenshot of dashboard widget added by WP Armour plugin (free version)

To move the “WP Armour” menu element from admin menu to the plugin page and remove “WP Armour Antispam Statistics” widget from the WordPress dashboard add this code snippet in your theme functions.php file or place it in a must-use plugin:

// Remove "WP Armour Anti Spam Statistics" widget from the WordPress dashboard
add_action('admin_init', function() {
   remove_action("wp_dashboard_setup", "wpa_dashboard_widget");
});

// Remove WP Armour from the admin menu
add_action('admin_menu', function() {
    remove_menu_page('wp-armour');
}, 999);

// Re-add the link to the WP Armour settings page in the Plugins page
add_filter('plugin_action_links_honeypot/wp-armour.php', function($links) {
    array_push($links, '<a href="'.admin_url('admin.php?page=wp-armour').'">Settings</a>');
    return $links;
});

In any other ways, even a free version of this plugin is an effective solution to fight against spam in the WordPress contact and comment forms, including WooCommerce product feedback forms. I certainly recommend it as I’m personally using it in lot of my projects and haven’t faced any problems.

About the author
I'm a full-stack WordPress developer with a 10+ years of solid experience in the core web development languages, development processes / techniques, web security, Linux server management and with pretty good understanding about proper semantics, UX/UI, technical SEO, good design and basic knowledge of company leadership. On top of that - a distant 5+ years experience as a computer and electronics repair technician which often enables me to understand also how the things work at the hardware level.