Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
PermalinksHealthCheck | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
test | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace NewfoldLabs\WP\Module\Performance\HealthChecks; |
4 | |
5 | /** |
6 | * Health check for permalinks. |
7 | */ |
8 | class PermalinksHealthCheck extends HealthCheck { |
9 | /** |
10 | * Constructor. |
11 | */ |
12 | public function __construct() { |
13 | $this->id = 'newfold-permalinks'; |
14 | $this->title = esc_html__( 'Permalinks', 'wp-module-performance' ); |
15 | $this->passing_text = esc_html__( 'Permalinks are pretty', 'wp-module-performance' ); |
16 | $this->failing_text = esc_html__( 'Permalinks are not set up', 'wp-module-performance' ); |
17 | $this->description = esc_html__( 'Setting permalinks to anything other than plain can improve performance and SEO.', 'wp-module-performance' ); |
18 | } |
19 | |
20 | /** |
21 | * Test the permalinks setting. |
22 | * |
23 | * @return bool |
24 | */ |
25 | public function test() { |
26 | return ! empty( get_option( 'permalink_structure' ) ); |
27 | } |
28 | } |