Skip to content

Introduce the task analyzer concept to use in the new tasks#22959

Merged
vraja-pro merged 6 commits intofeature/task-list-phase-2from
1056-task-list-backend-build-the-backend-data-of-the-score-analyzer
Feb 11, 2026
Merged

Introduce the task analyzer concept to use in the new tasks#22959
vraja-pro merged 6 commits intofeature/task-list-phase-2from
1056-task-list-backend-build-the-backend-data-of-the-score-analyzer

Conversation

@leonidasmi
Copy link
Copy Markdown
Contributor

@leonidasmi leonidasmi commented Feb 9, 2026

Context

Summary

This PR can be summarized in the following changelog entry:

  • Adds a special analyzer for SEO and Readability child tasks.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Prerequisites

  • Have at least 3 published posts (modified within the last 2 months) with different SEO scores: one good, one ok, and one bad.
  • Same for readability scores if possible (can be the same posts or different ones).

Steps

1. Call the endpoint

GET /wp-json/yoast/v1/get_tasks (authenticated as an admin user with wpseo_manage_options capability).

2. Verify child tasks have the analyzer key

Find any child task in the response (tasks that have a parentTaskId field). Each one should now include an analyzer object.

3. Verify the analyzer structure

For SEO child tasks (where parentTaskId starts with improve-content-seo-), verify:

"analyzer": {
    "type": "score",
    "title": "SEO analysis",
    "result": "<good|ok|bad>",
    "resultLabel": "<Good|OK|Needs improvement>",
    "resultDescription": "<string>"
}

For readability child tasks (where parentTaskId starts with improve-content-readability-), verify:

"analyzer": {
    "type": "score",
    "title": "Readability",
    "result": "<good|ok|bad>",
    "resultLabel": "<Good|OK|Needs improvement>",
    "resultDescription": "<string>"
}

4. Verify result-to-label mapping

score Expected scoreLabel
good Good
ok OK
bad Needs improvement

5. Verify resultDescription text per score result

Note: Subject to change when copies are finalized

For SEO child tasks:

  • good → "This post's SEO is looking good. Your content should perform well across search engines and AI systems."
  • ok → "This post has some SEO issues that could be improved to increase its visibility in search and AI systems."
  • bad → "This post has one or more SEO issues that may reduce its visibility in search and AI systems."

For readability child tasks:

  • good → "This post's readability is looking good. Your content should be easy for readers to understand."
  • ok → "This post has some readability issues that could be improved to make it easier to read."
  • bad → "This post has one or more readability issues that may make it harder for readers to understand."

6. Verify parent tasks do NOT have an analyzer key

Tasks where parentTask is true should not contain an analyzer field.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.
  • I have run grunt build:images and commited the results, if my PR introduces new images or SVGs.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #

@leonidasmi leonidasmi added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Feb 9, 2026
@leonidasmi leonidasmi added this to the feature/task-list-phase-2 milestone Feb 9, 2026
Base automatically changed from 1053-add-improve-your-contents-readability-task to feature/task-list-phase-2 February 10, 2026 07:17
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 10, 2026

Pull Request Test Coverage Report for Build 4fc0b5d9b33c4d2a959cd800d6d1b1c297133e7a

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 42 of 61 (68.85%) changed or added relevant lines in 4 files are covered.
  • 39 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.09%) to 50.334%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/task-list/domain/tasks/abstract-child-task.php 2 4 50.0%
src/task-list/domain/components/score-task-analyzer.php 0 17 0.0%
Files with Coverage Reduction New Missed Lines %
src/repositories/indexable-repository.php 3 27.04%
src/integrations/front-end-integration.php 36 76.1%
Totals Coverage Status
Change from base Build ab4f593be7158208451b7670bca52c0e84f1e32d: 0.09%
Covered Lines: 18327
Relevant Lines: 36411

💛 - Coveralls

@leonidasmi leonidasmi force-pushed the 1056-task-list-backend-build-the-backend-data-of-the-score-analyzer branch from d462c25 to b731b0e Compare February 10, 2026 10:04
@leonidasmi leonidasmi marked this pull request as ready for review February 10, 2026 14:08
Copy link
Copy Markdown
Contributor

@thijsoo thijsoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 CR ✅

Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR & AC ✅

@vraja-pro vraja-pro merged commit 41fe08b into feature/task-list-phase-2 Feb 11, 2026
27 checks passed
@vraja-pro vraja-pro deleted the 1056-task-list-backend-build-the-backend-data-of-the-score-analyzer branch February 11, 2026 14:34
@leonidasmi leonidasmi mentioned this pull request Feb 18, 2026
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants