PluginProbe ʕ •ᴥ•ʔ
WP Popular Posts / 7.3.5
WP Popular Posts v7.3.5
4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 5.0.0 5.0.1 5.0.2 5.1.0 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.4.0 5.4.1 5.4.2 5.5.0 5.5.1 6.0.0 6.0.1 6.0.2 6.0.3 6.0.4 6.0.5 6.1.0 6.1.1 6.1.2 6.1.3 6.1.4 6.2.0 6.2.1 6.3.0 6.3.1 6.3.2 6.3.3 6.3.4 6.4.0 6.4.1 6.4.2 7.0.0 7.0.1 7.1.0 7.2.0 7.3.0 7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.3.7 7.3.8 7.4.0 trunk 2.3.7 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.2 4.0.3 4.0.5 4.0.6
wordpress-popular-posts / src / Admin / screen-debug.php
wordpress-popular-posts / src / Admin Last commit date
Admin.php 8 months ago admin-page.php 8 months ago screen-debug.php 8 months ago screen-stats.php 8 months ago screen-tools.php 8 months ago
screen-debug.php
78 lines
1 <?php
2 if ( 'debug' == $current ) {
3
4 if ( ! current_user_can('edit_others_posts') ) {
5 echo '<p style="text-align: center;">' . esc_html(__('Sorry, you do not have enough permissions to do this. Please contact the site administrator for support.', 'wordpress-popular-posts')) . '</p>';
6 }
7 else {
8 global $wpdb, $wp_version;
9
10 $my_theme = wp_get_theme();
11 $site_plugins = get_plugins();
12 $plugin_names = [];
13 $performance_nag = get_option('wpp_performance_nag');
14
15 if ( ! $performance_nag ) {
16 $performance_nag = [
17 'status' => 0,
18 'last_checked' => null
19 ];
20 }
21
22 switch($performance_nag['status']) {
23 case 0:
24 $performance_nag_status = 'Inactive';
25 break;
26 case 1:
27 $performance_nag_status = 'Active';
28 break;
29 case 2:
30 $performance_nag_status = 'Remind me later';
31 break;
32 case 3:
33 $performance_nag_status = 'Dismissed';
34 break;
35 default:
36 $performance_nag_status = 'Inactive';
37 break;
38 }
39
40 foreach( $site_plugins as $main_file => $plugin_meta ) :
41 if ( ! is_plugin_active($main_file) ) {
42 continue;
43 }
44 $plugin_names[] = sanitize_text_field($plugin_meta['Name'] . ' ' . $plugin_meta['Version']);
45 endforeach;
46
47 // Image formats support
48 $webp_support = \WP_Image_Editor_GD::supports_mime_type('image/webp');
49 $avif_support = \WP_Image_Editor_GD::supports_mime_type('image/avif');
50 ?>
51 <div id="wpp_debug">
52 <h3>Plugin Configuration</h3>
53 <p><strong>Performance Nag:</strong> <?php echo $performance_nag_status; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $performance_nag_status is safe to use ?></p>
54 <p><strong>Log Limit:</strong> <?php echo ( $this->config['tools']['log']['limit'] ) ? 'Yes, keep data for ' . esc_html($this->config['tools']['log']['expires_after']) . ' days' : 'No'; ?></p>
55 <p><strong>Log Views From:</strong> <?php echo ( 0 == $this->config['tools']['log']['level'] ) ? 'Visitors only' : ( (2 == $this->config['tools']['log']['level']) ? 'Logged-in users only' : 'Everyone' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
56 <p><strong>Data Caching:</strong> <?php echo ( $this->config['tools']['cache']['active'] ) ? 'Yes, ' . esc_html($this->config['tools']['cache']['interval']['value']) . ' ' . esc_html($this->config['tools']['cache']['interval']['time']) : 'No'; ?></p>
57 <p><strong>Data Sampling:</strong> <?php echo ( $this->config['tools']['sampling']['active'] ) ? 'Yes, with a rate of ' . esc_html($this->config['tools']['sampling']['rate']) : 'No'; ?></p>
58 <p><strong>External object cache:</strong> <?php echo ( wp_using_ext_object_cache() ) ? 'Yes' : 'No'; ?></p>
59 <p><strong>WPP_CACHE_VIEWS:</strong> <?php echo ( defined('WPP_CACHE_VIEWS') && WPP_CACHE_VIEWS ) ? 'Yes' : 'No'; ?></p>
60
61 <br />
62
63 <h3>System Info</h3>
64 <p><strong>PHP version:</strong> <?php echo phpversion(); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
65 <p><strong>PHP extensions:</strong> <?php echo implode(', ', get_loaded_extensions()); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
66 <p><strong>AVIF support:</strong> <?php echo $avif_support ? 'Yes' : 'No'; ?></p>
67 <p><strong>WebP support:</strong> <?php echo $webp_support ? 'Yes' : 'No'; ?></p>
68 <p><strong>Database version:</strong> <?php echo $wpdb->get_var('SELECT VERSION();'); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching ?></p>
69 <p><strong>InnoDB availability:</strong> <?php echo $wpdb->get_var("SELECT SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE = 'InnoDB';"); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching ?></p>
70 <p><strong>WordPress version:</strong> <?php echo $wp_version; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $wp_version is safe to use ?></p>
71 <p><strong>Multisite:</strong> <?php echo ( function_exists('is_multisite') && is_multisite() ) ? 'Yes' : 'No'; ?></p>
72 <p><strong>Active plugins:</strong> <?php echo implode(', ', $plugin_names); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $plugin_names is safe to use ?></p>
73 <p><strong>Theme:</strong> <?php echo esc_html($my_theme->get('Name')) . ' (' . esc_html($my_theme->get('Version')) . ') by ' . esc_html($my_theme->get('Author')); ?></p>
74 </div>
75 <?php
76 }
77 }
78