w3guy / persist-admin-notices-dismissal

Simple plugin that persists dismissal of admin notices across pages in WordPress dashboard.
http://w3guy.com/wordpress-admin-notices-dismissible/
87 stars 22 forks source link

Update for WPCS #35

Closed afragen closed 3 years ago

afragen commented 3 years ago

There are a couple of remaining WPCS errors.

----------------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 3 WARNINGS AFFECTING 10 LINES
----------------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [ ] There must be no blank lines before the file comment (Squiz.Commenting.FileComment.SpacingAfterOpen)
  23 | ERROR   | [ ] Only one @author tag is allowed in a file comment (Squiz.Commenting.FileComment.DuplicateAuthorTag)
  88 | ERROR   | [ ] Version parameter is not explicitly set or has been set to an equivalent of "false" for wp_enqueue_script;
     |         |     This means that the WordPress core version will be used which is not recommended for plugin or theme
     |         |     development. (WordPress.WP.EnqueuedResourceParameters.NoExplicitVersion)
 110 | ERROR   | [ ] Detected usage of a possibly undefined superglobal array index: $_POST['option_name']. Use isset() or
     |         |     empty() to check the index exists before using it
     |         |     (WordPress.Security.ValidatedSanitizedInput.InputNotValidated)
 110 | ERROR   | [ ] $_POST data not unslashed before sanitization. Use wp_unslash() or similar
     |         |     (WordPress.Security.ValidatedSanitizedInput.MissingUnslash)
 111 | ERROR   | [ ] Detected usage of a possibly undefined superglobal array index: $_POST['dismissible_length']. Use isset() or
     |         |     empty() to check the index exists before using it
     |         |     (WordPress.Security.ValidatedSanitizedInput.InputNotValidated)
 111 | ERROR   | [ ] $_POST data not unslashed before sanitization. Use wp_unslash() or similar
     |         |     (WordPress.Security.ValidatedSanitizedInput.MissingUnslash)
 113 | WARNING | [ ] Found: !=. Use strict comparisons (=== or !==). (WordPress.PHP.StrictComparisons.LooseComparison)
 114 | ERROR   | [ ] Inline comments must end in full-stops, exclamation marks, or question marks
     |         |     (Squiz.Commenting.InlineComment.InvalidEndChar)
 115 | WARNING | [ ] Found: ==. Use strict comparisons (=== or !==). (WordPress.PHP.StrictComparisons.LooseComparison)
 137 | WARNING | [ ] Found: ==. Use strict comparisons (=== or !==). (WordPress.PHP.StrictComparisons.LooseComparison)