WordPress / WordPress/WordPress-Coding-Standards

Add check for WP_UNINSTALL_PLUGIN

Open
#1,338 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Focus: Security Focus: WP interoperability
Dominant language
PHP
Stars
2.8k
Forks
521
Avg merge
5d 20h
Merged PRs (30d)
1

Description

Hello,

I'd like to suggest the following:

How about adding a notice if ! defined( 'WP_UNINSTALL_PLUGIN' ) is not present in uninstall.php files?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for the sniff or entry point that analyzes uninstall.php, then locate its corresponding tests. Confirm how existing notices are asserted and cover the case where WP_UNINSTALL_PLUGIN is not defined; done means the missing definition produces the expected notice without false positives.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.