Skip to content

[Bug]: Inaccurate content analysis when the focus keyphrase contains a period #23222

@michaelbriantina

Description

@michaelbriantina

Prerequisites

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

When you set a focus keyphrase in the SEO analysis and it contains a period (.), it will provide an inaccurate assessment in the content analysis. In particular, it's the "keyphrase in slug" assessment that will show an orange score for the assessment where it'll give feedback that "part of your keyphrase does not appear in the slug. Change that."

Image

Step-by-step reproduction instructions

  1. Create a new test site and install Yoast SEO 27.5
  2. Create a new test post using the default editor and set the focus keyphrase (Ubuntu 26.04 available), SEO title (Ubuntu 26.04 Available for VPS & Dedicated Servers), and slug (ubuntu-26-04-available-for-vps-dedicated-servers).
  3. Add some other content

Expected results

  1. That the assessment would be green and would detect the focus keyphrase in the slug

Actual results

  1. The assessment shows an orange score and "part of your keyphrase does not appear in the slug. Change that." is the feedback.

Screenshots, screen recording, code snippet

This was a reported issue previously but was closed after it was reported to be fixed - #19691

I tried a similar focus keyphrase of "MacOS 26.4 available" and SEO title of "MacOS 26.4 available for compatible devices" and slug of "macos-26-4-available-for-compatible-devices" and it still has the same inaccuracy for the keyphrase in slug assessment.

This issue doesn't seem to affect other assessments like keyphrase in SEO title, keyphrase in introduction, keyphrase in image alt attributes, keyphrase density, and keyphrase in meta description as it can be an exact match. It looks to only be happening to the keyphrase in slug assessment specifically.

Which editor is affected (or editors)

  • Block Editor
  • Gutenberg Editor
  • Elementor Editor
  • Classic Editor
  • Other (please specify in additional info)

Which browser is affected (or browsers)

  • Chrome
  • Firefox
  • Safari
  • Other (please specify in additional info)

Device you are using

No response

Operating system

No response

PHP version

No response

WordPress version

6.9.4

WordPress Theme

No response

Yoast SEO version

27.5

Gutenberg plugin version (if relevant)

No response

Elementor plugin version (if relevant)

No response

Classic Editor plugin version (if relevant)

No response

Relevant plugins in case of a bug

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions