Title: Problems with Plugin Check
Last modified: November 29, 2024

---

# Problems with Plugin Check

 *  [Kerry Matthews](https://wordpress.org/support/users/systemdude/)
 * (@systemdude)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/problems-with-plugin-check/)
 * I am having very frustrating problems with verifying plugin code using the WordPress
   Plugin Check plugin. Below is some sample code –
 * if ( isset( $_POST[‘dmuk_toc_meta_nonce’] ) ) {
   // Unsash the nonce value$nonce_value
   = wp_unslash( $_POST[‘dmuk_toc_meta_nonce’] );
 *     ```wp-block-code
       // Now verify the nonce
       if ( ! wp_verify_nonce( $nonce_value, 'dmuk_toc_meta_nonce' ) ) {
           // Nonce verification failed, handle the error
           return; // Or handle appropriately
       }
       ```
   
 * } else {
   // Nonce not set, handle the errorreturn; // Or handle appropriately}
   This code triggers the warning –Detected usage of a non-sanitized input variable:
   $_POST[‘xxxx_xxx_meta_nonce’]I correct this and I get a warning about unslashing,
   I correct that and i get error about sanitising, I correct that and i get warning
   about unslashing – and so it continues. Correcting one error causes another error.
   How should i format this code to fix all warningsNote – the xxx is replacing 
   my actual reference for security reasonsAny post and verify that involves a nonce
   gives an immense and never ending cycle of warnings!I am lost for a solution 
   to this continuous cycle of error – fix new error – fix – new error – fix – old
   error ! It is so frustrating
    -  This topic was modified 1 year, 6 months ago by [Kerry Matthews](https://wordpress.org/support/users/systemdude/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblems-with-plugin-check%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/problems-with-plugin-check/#post-18169889)
 * The correct code would be:
 *     ```wp-block-code
       sanitize_text_field( wp_unslash( $_POST['dmuk_toc_meta_nonce'] ) );
       ```
   
 *  Thread Starter [Kerry Matthews](https://wordpress.org/support/users/systemdude/)
 * (@systemdude)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/problems-with-plugin-check/#post-18170482)
 * [@threadi](https://wordpress.org/support/users/threadi/) 
   Many thanks !

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problems with Plugin Check’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [Kerry Matthews](https://wordpress.org/support/users/systemdude/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/problems-with-plugin-check/#post-18170482)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
