yoastseo-dep
Version:
Yoast clientside page analysis
140 lines (134 loc) • 4.73 kB
JavaScript
import Paper from "../../../../../../src/values/Paper.js";
import content from "./englishPaper2.html";
const name = "englishPaper2";
const paper = new Paper( content, {
keyword: "Science fiction",
synonyms: "sci-fi",
description: "Science fiction (sometimes shortened to sci-fi or SF) is a genre of speculative fiction that typically deals " +
"with imaginative and futuristic concepts such as advanced science and technology, space exploration, " +
"time travel, parallel universes, and extraterrestrial life.",
title: "Science fiction",
titleWidth: 450,
locale: "en_EN",
permalink: "https://en.wikipedia.org/wiki/Science_fiction",
slug: "https://en.wikipedia.org/wiki/Science_fiction",
} );
const expectedResults = {
introductionKeyword: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify8' target='_blank'>Keyphrase in introduction</a>: Well done!",
},
keyphraseLength: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify10' target='_blank'>Keyphrase length</a>: Good job!",
},
keywordDensity: {
isApplicable: true,
score: -50,
resultText: "<a href='https://yoa.st/shopify12' target='_blank'>Keyphrase density</a>: The keyphrase was found 5 times. " +
"That's way more than the recommended maximum of 4 times for a text of this length." +
" <a href='https://yoa.st/shopify13' target='_blank'>Don't overoptimize</a>!",
},
metaDescriptionKeyword: {
isApplicable: true,
score: 3,
resultText: "<a href='https://yoa.st/shopify14' target='_blank'>Keyphrase in meta description</a>: The meta description " +
"contains the keyphrase 3 times, which is over the advised maximum of 2 times. <a href='https://yoa.st/shopify15' " +
"target='_blank'>Limit that</a>!",
},
metaDescriptionLength: {
isApplicable: true,
score: 6,
resultText: "<a href='https://yoa.st/shopify46' target='_blank'>Meta description length</a>: The meta description is " +
"over 156 characters. To ensure the entire description will be visible, <a href='https://yoa.st/shopify47' " +
"target='_blank'>you should reduce the length</a>!",
},
textLength: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify58' target='_blank'>Text length</a>: The text contains 166 words. Good job!",
},
keyphraseInSEOTitle: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify24' target='_blank'>Keyphrase in SEO title</a>: The exact match of the focus keyphrase " +
"appears at the beginning of the SEO title. Good job!",
},
titleWidth: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify52' target='_blank'>SEO title width</a>: Good job!",
},
slugKeyword: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify26' target='_blank'>Keyphrase in slug</a>: Great work!",
},
functionWordsInKeyphrase: {
isApplicable: true,
score: 0,
resultText: "",
},
singleH1: {
isApplicable: true,
score: 0,
resultText: "",
},
keyphraseDistribution: {
// The text doesn't contain more than 15 sentences.
isApplicable: false,
},
subheadingsTooLong: {
isApplicable: false,
},
textParagraphTooLong: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify66' target='_blank'>Paragraph length</a>: None of the paragraphs are too long. Great job!",
},
textSentenceLength: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify48' target='_blank'>Sentence length</a>: Great!",
},
textTransitionWords: {
isApplicable: false,
},
passiveVoice: {
isApplicable: true,
score: 3,
resultText: "<a href='https://yoa.st/shopify42' target='_blank'>Passive voice</a>: 20% of the sentences contain passive voice, " +
"which is more than the recommended maximum of 10%. <a href='https://yoa.st/shopify43' target='_blank'>" +
"Try to use their active counterparts</a>.",
},
textPresence: {
isApplicable: true,
score: 0,
resultText: "",
},
sentenceBeginnings: {
isApplicable: true,
score: 9,
resultText: "<a href='https://yoa.st/shopify5' target='_blank'>Consecutive sentences</a>: There is enough variety " +
"in your sentences. That's great!",
},
wordComplexity: {
isApplicable: true,
score: 6,
// eslint-disable-next-line max-len
resultText: "<a href='https://yoa.st/shopify77' target='_blank'>Word complexity</a>: 15.66% of the words in your text are considered complex. " +
"<a href='https://yoa.st/shopify78' target='_blank'>Try to use shorter and more familiar words to improve readability</a>.",
},
};
export {
name,
paper,
expectedResults,
};
export default {
name: name,
paper: paper,
expectedResults: expectedResults,
};