PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / trunk
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript vtrunk
4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 All 169 releases
searchpro / admin / tabs / debloat.php

debloat.php in BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript trunk, at admin/tabs/debloat.php

145 lines 7.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH'))
3 exit;
4
5 $heartbeat_mode = get_option('berqwp_heartbeat_mode', 'default');
6 $heartbeat_interval = get_option('berqwp_heartbeat_interval', 60);
7 ?>
8 <div id="debloat" <?php bwp_is_tab('debloat'); ?>>
9 <h2 class="berq-tab-title">
10 <?php esc_html_e('Debloat', 'searchpro'); ?>
11 </h2>
12
13 <div class="berq-info-box">
14 <h3 class="berq-box-title">
15 <?php esc_html_e('Heartbeat API', 'searchpro'); ?>
16 </h3>
17 <div class="berq-box-content">
18 <p>
19 <?php esc_html_e('The Heartbeat API powers autosave, post-lock warnings ("another user is editing this post"), and admin session checks by polling the server every 15-60 seconds. Restricting or disabling it reduces server load and admin-ajax requests.', 'searchpro'); ?>
20 </p>
21
22 <label class="berq-check">
23 <input type="radio" name="berqwp_heartbeat_mode" value="default" <?php echo $heartbeat_mode === 'default' ? 'checked' : ''; ?>>
24 <?php esc_html_e('Default (no changes)', 'searchpro'); ?>
25 </label>
26 <label class="berq-check">
27 <input type="radio" name="berqwp_heartbeat_mode" value="restrict" <?php echo $heartbeat_mode === 'restrict' ? 'checked' : ''; ?>>
28 <?php esc_html_e('Restrict to post editor only (recommended)', 'searchpro'); ?>
29 </label>
30 <label class="berq-check">
31 <input type="radio" name="berqwp_heartbeat_mode" value="throttle" <?php echo $heartbeat_mode === 'throttle' ? 'checked' : ''; ?>>
32 <?php esc_html_e('Throttle interval everywhere', 'searchpro'); ?>
33 </label>
34 <label class="berq-check">
35 <input type="radio" name="berqwp_heartbeat_mode" value="disable" <?php echo $heartbeat_mode === 'disable' ? 'checked' : ''; ?>>
36 <?php esc_html_e('Disable completely', 'searchpro'); ?>
37 </label>
38
39 <div class="berqwp-heartbeat-interval" style="<?php echo $heartbeat_mode === 'throttle' ? '' : 'display:none;'; ?>">
40 <label>
41 <?php esc_html_e('Interval in seconds (15-300):', 'searchpro'); ?>
42 <input type="number" name="berqwp_heartbeat_interval" min="15" max="300" value="<?php echo esc_attr($heartbeat_interval); ?>">
43 </label>
44 </div>
45
46 <p>
47 <em><?php esc_html_e('Note: disabling completely also disables autosave and post-lock warnings. "Restrict to post editor only" keeps those features working on the edit screen while stopping Heartbeat everywhere else.', 'searchpro'); ?></em>
48 </p>
49 </div>
50 </div>
51
52 <div class="berq-info-box berq-setting-group">
53 <div class="group-container">
54 <h3 class="berq-box-title">
55 <?php esc_html_e('Emojis', 'searchpro'); ?>
56 </h3>
57 <div class="berq-box-content berq-setting-toggle">
58 <div class="berq-option-content">
59 <p>
60 <?php esc_html_e("The WordPress emoji script loads on all pages, which can slow down loading speed. If your website doesn't use emojis, it's better to disable it.", 'searchpro'); ?>
61 </p>
62 </div>
63 <?php berqwp_render_toggle('berqwp_disable_emojis', get_option('berqwp_disable_emojis')); ?>
64 </div>
65 </div>
66
67 <div class="group-container">
68 <h3 class="berq-box-title">
69 <?php esc_html_e('Embeds', 'searchpro'); ?>
70 </h3>
71 <div class="berq-box-content berq-setting-toggle">
72 <div class="berq-option-content">
73 <p>
74 <?php esc_html_e('Disable WordPress oEmbed discovery and the embed JavaScript. Embedding your posts elsewhere via oEmbed will stop working.', 'searchpro'); ?>
75 </p>
76 </div>
77 <?php berqwp_render_toggle('berqwp_disable_embeds', get_option('berqwp_disable_embeds')); ?>
78 </div>
79 </div>
80
81 <div class="group-container">
82 <h3 class="berq-box-title">
83 <?php esc_html_e('XML-RPC', 'searchpro'); ?>
84 </h3>
85 <div class="berq-box-content berq-setting-toggle">
86 <div class="berq-option-content">
87 <p>
88 <?php esc_html_e('XML-RPC is rarely needed by modern sites and is a common target for brute-force attacks.', 'searchpro'); ?>
89 </p>
90 </div>
91 <?php berqwp_render_toggle('berqwp_disable_xmlrpc', get_option('berqwp_disable_xmlrpc')); ?>
92 </div>
93 </div>
94
95 <div class="group-container">
96 <h3 class="berq-box-title">
97 <?php esc_html_e('REST API Discovery Link', 'searchpro'); ?>
98 </h3>
99 <div class="berq-box-content berq-setting-toggle">
100 <div class="berq-option-content">
101 <p>
102 <?php esc_html_e("Remove the REST API discovery link from your site's <head>. The REST API itself keeps working.", 'searchpro'); ?>
103 </p>
104 </div>
105 <?php berqwp_render_toggle('berqwp_remove_rest_head_links', get_option('berqwp_remove_rest_head_links')); ?>
106 </div>
107 </div>
108
109 <div class="group-container">
110 <h3 class="berq-box-title">
111 <?php esc_html_e('Head Cleanup', 'searchpro'); ?>
112 </h3>
113 <div class="berq-box-content berq-setting-toggle">
114 <div class="berq-option-content">
115 <p>
116 <?php esc_html_e('Remove the RSD link, Windows Live Writer manifest link, shortlink, and WordPress generator meta tag from your <head>.', 'searchpro'); ?>
117 </p>
118 </div>
119 <?php berqwp_render_toggle('berqwp_remove_head_meta', get_option('berqwp_remove_head_meta')); ?>
120 </div>
121 </div>
122
123 <div class="group-container">
124 <h3 class="berq-box-title">
125 <?php esc_html_e('Self Pingbacks', 'searchpro'); ?>
126 </h3>
127 <div class="berq-box-content berq-setting-toggle">
128 <div class="berq-option-content">
129 <p>
130 <?php esc_html_e('Prevent WordPress from creating pingback comments when you link to your own posts.', 'searchpro'); ?>
131 </p>
132 </div>
133 <?php berqwp_render_toggle('berqwp_disable_self_pingbacks', get_option('berqwp_disable_self_pingbacks')); ?>
134 </div>
135 </div>
136 </div>
137
138 <button type="submit" class="berqwp-save"><svg width="20" height="20" viewBox="0 0 20 20" fill="none"
139 xmlns="http://www.w3.org/2000/svg">
140 <path d="M4.16663 10.8333L7.49996 14.1667L15.8333 5.83334" stroke="white" stroke-width="2"
141 stroke-linecap="round" stroke-linejoin="round" />
142 </svg>
143 <?php esc_html_e("Save changes", "searchpro"); ?></button>
144 </div>
145