Create a sniff to make sure `wpseo*` options aren't used directly

Open
#69 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by locating the Options framework and existing coding-standard sniffs that inspect option access. Trace uses of get_options with wpseo* option names, then add coverage showing that direct access is rejected while framework usage passes.

Written by the indexing model from the issue text.

Description

Prio: 2/Medium Type: enhancement

As we have the Options framework to handle options properly and apply defaults for options that aren't saved yet, we need to make sure this framework is always used instead of directly calling get_options with the option name.

Dominant language
PHP
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

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.

More from Yoast/yoastcs

All issues in Yoast/yoastcs

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.