Plugin Directory

Changeset 3477197


Ignore:
Timestamp:
03/07/2026 10:24:14 PM (4 weeks ago)
Author:
webfulchris
Message:

v2.5.3 - Fix: reduce check_quota timeout (15s->2s) and cache duration (5min->1h) to prevent blocking page loads

Location:
webful
Files:
7 edited
4 copied

Legend:

Unmodified
Added
Removed
  • webful/tags/2.5.3/assets/js/webful-tracker.js

    r3477164 r3477197  
    1414
    1515    // Marqueur de version pour détection de mise à jour
    16     window.WEBFUL_PLUGIN_VERSION = '2.5.2';
     16    window.WEBFUL_PLUGIN_VERSION = '2.5.3';
    1717
    1818    // Configuration injectée par WordPress
  • webful/tags/2.5.3/includes/class-webful-api.php

    r3409217 r3477197  
    9797
    9898        $response = wp_remote_post($this->api_base . '/check-quota.php', array(
    99             'timeout' => 15,
     99            'timeout' => 2,
    100100            'headers' => array('Content-Type' => 'application/json'),
    101101            'body' => json_encode(array(
  • webful/tags/2.5.3/includes/class-webful-tracker.php

    r3400049 r3477197  
    7171        // Vérifier le quota si l'option est activée
    7272        if (get_option('webful_check_quota', '1') === '1') {
    73             // Utiliser un transient pour mettre en cache le quota (5 minutes)
     73            // Utiliser un transient pour mettre en cache le quota (1 heure)
    7474            $quota_cache = get_transient('webful_quota_check');
    7575
     
    7979                if (is_wp_error($quota)) {
    8080                    // En cas d'erreur, continuer le tracking (fail-safe)
    81                     set_transient('webful_quota_check', array('quota_ok' => true), 5 * MINUTE_IN_SECONDS);
     81                    set_transient('webful_quota_check', array('quota_ok' => true), HOUR_IN_SECONDS);
    8282                } else {
    8383                    $quota_ok = isset($quota['quota_ok']) ? $quota['quota_ok'] : false;
    84                     set_transient('webful_quota_check', array('quota_ok' => $quota_ok), 5 * MINUTE_IN_SECONDS);
     84                    set_transient('webful_quota_check', array('quota_ok' => $quota_ok), HOUR_IN_SECONDS);
    8585
    8686                    if (!$quota_ok) {
  • webful/tags/2.5.3/readme.txt

    r3477164 r3477197  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 2.5.2
     8Stable tag: 2.5.3
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • webful/tags/2.5.3/webful.php

    r3477164 r3477197  
    33 * Plugin Name: WEBFUL Analytics
    44 * Description: Système d'analyse de trafic ultra-léger et respectueux de la vie privée. Suivez vos statistiques sans ralentir votre site.
    5  * Version: 2.5.2
     5 * Version: 2.5.3
    66 * Author: WEBFUL
    77 * Author URI: https://webful.fr
     
    2020
    2121// Définir les constantes du plugin
    22 define('WEBFUL_VERSION', '2.5.2');
     22define('WEBFUL_VERSION', '2.5.3');
    2323define('WEBFUL_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2424define('WEBFUL_PLUGIN_URL', plugin_dir_url(__FILE__));
  • webful/trunk/assets/js/webful-tracker.js

    r3477164 r3477197  
    1414
    1515    // Marqueur de version pour détection de mise à jour
    16     window.WEBFUL_PLUGIN_VERSION = '2.5.2';
     16    window.WEBFUL_PLUGIN_VERSION = '2.5.3';
    1717
    1818    // Configuration injectée par WordPress
  • webful/trunk/includes/class-webful-api.php

    r3409217 r3477197  
    9797
    9898        $response = wp_remote_post($this->api_base . '/check-quota.php', array(
    99             'timeout' => 15,
     99            'timeout' => 2,
    100100            'headers' => array('Content-Type' => 'application/json'),
    101101            'body' => json_encode(array(
  • webful/trunk/includes/class-webful-tracker.php

    r3400049 r3477197  
    7171        // Vérifier le quota si l'option est activée
    7272        if (get_option('webful_check_quota', '1') === '1') {
    73             // Utiliser un transient pour mettre en cache le quota (5 minutes)
     73            // Utiliser un transient pour mettre en cache le quota (1 heure)
    7474            $quota_cache = get_transient('webful_quota_check');
    7575
     
    7979                if (is_wp_error($quota)) {
    8080                    // En cas d'erreur, continuer le tracking (fail-safe)
    81                     set_transient('webful_quota_check', array('quota_ok' => true), 5 * MINUTE_IN_SECONDS);
     81                    set_transient('webful_quota_check', array('quota_ok' => true), HOUR_IN_SECONDS);
    8282                } else {
    8383                    $quota_ok = isset($quota['quota_ok']) ? $quota['quota_ok'] : false;
    84                     set_transient('webful_quota_check', array('quota_ok' => $quota_ok), 5 * MINUTE_IN_SECONDS);
     84                    set_transient('webful_quota_check', array('quota_ok' => $quota_ok), HOUR_IN_SECONDS);
    8585
    8686                    if (!$quota_ok) {
  • webful/trunk/readme.txt

    r3477164 r3477197  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 2.5.2
     8Stable tag: 2.5.3
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • webful/trunk/webful.php

    r3477164 r3477197  
    33 * Plugin Name: WEBFUL Analytics
    44 * Description: Système d'analyse de trafic ultra-léger et respectueux de la vie privée. Suivez vos statistiques sans ralentir votre site.
    5  * Version: 2.5.2
     5 * Version: 2.5.3
    66 * Author: WEBFUL
    77 * Author URI: https://webful.fr
     
    2020
    2121// Définir les constantes du plugin
    22 define('WEBFUL_VERSION', '2.5.2');
     22define('WEBFUL_VERSION', '2.5.3');
    2323define('WEBFUL_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2424define('WEBFUL_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.