• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 5d15e32b05964ff7cb8e534141c6ecce93f9b7b2

15 Jul 2025 11:08AM UTC coverage: 30.52% (-22.1%) from 52.595%
5d15e32b05964ff7cb8e534141c6ecce93f9b7b2

Pull #22381

github

web-flow
Merge b317abdcd into d6da65444
Pull Request #22381: JS: Solve react/require-default-props warnings

2368 of 9007 branches covered (26.29%)

Branch coverage included in aggregate %.

26 of 127 new or added lines in 57 files covered. (20.47%)

27 existing lines in 22 files now uncovered.

4858 of 14669 relevant lines covered (33.12%)

6.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/js/src/components/PluginIcon.js
1
/* eslint-disable complexity */
2
import PropTypes from "prop-types";
3
import styled from "styled-components";
4

5
const PluginIconSVG = styled.svg`
×
6
        width: ${ props => props.size }px;
×
7
        height: ${ props => props.size }px;
×
8

9
        &&& path {
10
                fill: ${ props => props.color };
×
11
        }
12

13
        &&& circle.yoast-icon-readability-score {
14
                fill: ${ props => props.readabilityScoreColor };
×
15
                display: ${ props => props.isContentAnalysisActive ? "inline" : "none" };
×
16
        }
17

18
        &&& circle.yoast-icon-seo-score {
19
                fill: ${ props => props.seoScoreColor };
×
20
                display: ${ props => props.isKeywordAnalysisActive ? "inline" : "none" };
×
21
        }
22
`;
23

24
/**
25
 * Renders the plugin icon SVG for Yoast SEO in the editor.
26
 *
27
 * @param {string} [readabilityScoreColor="#000000"] The color for the readability score circle.
28
 * @param {boolean} [isContentAnalysisActive=false] Whether the readability score circle is active.
29
 * @param {string} [seoScoreColor="#000000"] The color for the SEO score circle.
30
 * @param {boolean} [isKeywordAnalysisActive=false] Whether the SEO score circle is active.
31
 * @param {number} [size=20] The icon size in pixels.
32
 * @param {string} [color="#000001"] The main icon color.
33
 * @param {...Object} [props] Additional props.
34
 *
35
 * @returns {JSX.Element} The component.
36
 */
NEW
37
const PluginIcon = ( {
×
38
        readabilityScoreColor = "#000000",
×
39
        isContentAnalysisActive = false,
×
40
        seoScoreColor = "#000000",
×
41
        isKeywordAnalysisActive = false,
×
42
        size = 20,
×
43
        color = "#000001",
×
44
        ...props
45
} ) => {
NEW
46
        return <PluginIconSVG
×
47
                readabilityScoreColor={ readabilityScoreColor }
48
                isContentAnalysisActive={ isContentAnalysisActive }
49
                seoScoreColor={ seoScoreColor }
50
                isKeywordAnalysisActive={ isKeywordAnalysisActive }
51
                size={ size }
52
                color={ color }
53
                { ...props }
54
                xmlns="http://www.w3.org/2000/svg"
55
                viewBox="0 0 646.66 456.27"
56
        >
57
                <path
58
                        d="M73,405.26a68.53,68.53,0,0,1-12.82-4c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92q-2.64-2-5.08-4.19a68.26,68.26,0,0,1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24q-1.84-2.73-3.44-5.64a68.26,68.26,0,0,1-8.29-32.55V142.13a68.29,68.29,0,0,1,8.29-32.55,58.6,58.6,0,0,1,3.44-5.64,57.53,57.53,0,0,1,4-5.27A69.64,69.64,0,0,1,48.56,85.42,56.06,56.06,0,0,1,54.2,82,67.78,67.78,0,0,1,73,75.09,69.79,69.79,0,0,1,86.75,73.7H256.41L263,55.39H86.75A86.84,86.84,0,0,0,0,142.13V338.22A86.83,86.83,0,0,0,86.75,425H98.07V406.65H86.75A68.31,68.31,0,0,1,73,405.26ZM368.55,60.85l-1.41-.53L360.73,77.5l1.41.53a68.58,68.58,0,0,1,8.66,4,58.65,58.65,0,0,1,5.65,3.43A69.49,69.49,0,0,1,391,98.67c1.4,1.68,2.72,3.46,3.95,5.27s2.39,3.72,3.44,5.64a68.32,68.32,0,0,1,8.29,32.55V406.65H233.55l-.44.76c-3.07,5.37-6.26,10.48-9.49,15.19L222,425H425V142.13A87.19,87.19,0,0,0,368.55,60.85Z"
59
                        fill="#000001"
60
                />
61
                <path
62
                        d="M303.66,0l-96.8,268.87-47.58-149H101.1l72.72,186.78a73.61,73.61,0,0,1,0,53.73c-7.07,18.07-19.63,39.63-54.36,46l-1.56.29v49.57l2-.08c29-1.14,51.57-10.72,70.89-30.14,19.69-19.79,36.55-50.52,53-96.68L366.68,0Z"
63
                        fill="#000001"
64
                />
65
                <circle
66
                        className="yoast-icon-readability-score"
67
                        cx="561.26"
68
                        cy="142.43"
69
                        r="85.04"
70
                        fill="#000001"
71
                        stroke="#181716"
72
                        strokeMiterlimit="10"
73
                        strokeWidth="0.72"
74
                />
75
                <circle
76
                        className="yoast-icon-seo-score"
77
                        cx="561.26"
78
                        cy="341.96"
79
                        r="85.04"
80
                        fill="#000001"
81
                        stroke="#181716"
82
                        strokeMiterlimit="10"
83
                        strokeWidth="0.72"
84
                />
85
        </PluginIconSVG>;
86
};
87

88
PluginIcon.propTypes = {
×
89
        readabilityScoreColor: PropTypes.string,
90
        isContentAnalysisActive: PropTypes.bool,
91
        seoScoreColor: PropTypes.string,
92
        isKeywordAnalysisActive: PropTypes.bool,
93
        size: PropTypes.number,
94
        color: PropTypes.string,
95
};
96

97
export default PluginIcon;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc