Plugin Directory

Changeset 3390233


Ignore:
Timestamp:
11/05/2025 08:13:56 AM (4 months ago)
Author:
aryans
Message:
  • Improved User Experience.
  • Improved Diagnostic Data Handling.
Location:
site-suggest
Files:
32 added
5 edited

Legend:

Unmodified
Added
Removed
  • site-suggest/trunk/app/ajax-controller.php

    r3387629 r3390233  
    6767        }
    6868
     69        public function send_diagnostic_data()
     70        {
     71            $stsgt_settings_data = get_option('stsgt_settings_data', []);
     72            if (isset($stsgt_settings_data['stsgt_api_share_diagnostic_data'])) {
     73                $response = wp_remote_post('https://plugin.sitesuggest.io/wp-json/stsgt_host/v1/stsgt_diagnos', array(
     74                    'body' => array(
     75                        'client_url' => home_url(),
     76                        'data' => esc_html(wp_json_encode(get_option('stsgt_site_speed_data', []))),
     77                        'last_updated' => time()
     78                    )
     79                ));
     80
     81                if (!is_wp_error($response)) {
     82                    $body = wp_remote_retrieve_body($response);
     83                    // error_log(print_r($body, true));
     84                } else {
     85                    // error_log($response->get_error_message());
     86                }
     87            }
     88        }
     89
    6990        public function stsgt_dismiss_admin_notice_clbk()
    7091        {
     
    576597                return $stsgtp_MainController->check_broken_links($html_content, $post_id);
    577598            } else {
    578                 return ["Pro Version Required!"];
    579599                function link_prefix_exception($string, $substrings)
    580600                {
     
    10871107                }
    10881108
     1109                $this->send_diagnostic_data();
    10891110                wp_send_json($resp);
    10901111            } else {
     
    13671388
    13681389                    $is_cron_obs = in_array($check_name, $cron_observers) ? 'yes' : 'no';
     1390                    $this->send_diagnostic_data();
    13691391                    wp_send_json(array(
    13701392                        'status' => 200,
  • site-suggest/trunk/app/info-controller.php

    r3387629 r3390233  
    535535        {
    536536            $current_limit = ini_get('memory_limit');
    537             $current_limit = defined('WP_MEMORY_LIMIT') ? WP_MEMORY_LIMIT : $current_limit;
    538             $max_current_limit = defined('WP_MAX_MEMORY_LIMIT') ? WP_MAX_MEMORY_LIMIT : $current_limit;
     537            $current_limit = intval(defined('WP_MEMORY_LIMIT') ? WP_MEMORY_LIMIT : $current_limit);
     538            $max_current_limit = intval(defined('WP_MAX_MEMORY_LIMIT') ? WP_MAX_MEMORY_LIMIT : $current_limit);
    539539            $real_peak_used_memory = get_option('stsgt_peak_memory_limit', 0);
    540540
     
    551551            }
    552552            $sgst_limit .= '<br>WP_MAX_MEMORY_LIMIT (' . $max_current_limit . ')';
     553           
    553554            if($max_current_limit < $recommended){
    554555                $sgst_limit .= ' - Suggested memory limit  ' . $recommended . 'M.';
     
    16701671
    16711672                if (empty($resp_arr)) {
    1672                     $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url());
     1673                    $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url().'?perfmatters=false&ao_noptimize=1&nowprocket');
    16731674                    if (!is_wp_error($remote_data)) {
    16741675                        $response = $remote_data['body'];
     
    17041705
    17051706                if (empty($resp_arr)) {
    1706                     $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url());
     1707                    $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url().'?perfmatters=false&ao_noptimize=1&nowprocket');
    17071708                    if (!is_wp_error($remote_data)) {
    17081709                        $response = $remote_data['body'];
     
    17361737                }
    17371738                if (empty($resp_arr)) {
    1738                     $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url(), ['timeout' => 60]);
     1739                    $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url(),'?perfmatters=false&ao_noptimize=1&nowprocket', ['timeout' => 60]);
    17391740                    if (!is_wp_error($remote_data)) {
    17401741                        $response = $remote_data['body'];
     
    17701771
    17711772                if (empty($resp_arr)) {
    1772                     $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url(), ['timeout' => 60]);
     1773                    $remote_data = wp_remote_get('https://c.sitesuggest.io/?url=' . get_site_url().'?perfmatters=false&ao_noptimize=1&nowprocket', ['timeout' => 60]);
    17731774                    if (!is_wp_error($remote_data)) {
    17741775                        $response = $remote_data['body'];
  • site-suggest/trunk/app/main-controller.php

    r3387629 r3390233  
    3030      // add_action('process_all_pages_cron_event', array($this, 'process_all_pages'));
    3131      // add_action('stsgt_every_min_cron', array($this, 'process_all_pages_cron'));
    32       add_action('stsgt_every_min_cron', array($this, 'send_diagnostic_data'));
     32      // add_action('stsgt_every_min_cron', array($this, 'send_diagnostic_data'));
    3333      // add_action('wp_footer', array($this, 'process_all_pages_cron'));
    3434      add_action('init', array($this, 'register_stsgt_log_post_type'));
  • site-suggest/trunk/readme.txt

    r3387629 r3390233  
    44Tested up to:      6.8
    55Requires PHP:      7.2
    6 Stable tag:        1.3.7
     6Stable tag:        1.3.8
    77License:           GPLv2 or later
    88License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     
    151151== Changelog ==
    152152
    153 = 1.3.7 - 2025-09-19 =
     153= 1.3.8 - 2025-11-05 =
     154* Improved User Experience.
     155* Improved Diagnostic Data Handling.
     156
     157= 1.3.7 - 2025-10-27 =
    154158* Improved Captcha Detection.
    155159* Refined Cookie Banner Check.
    156160* Added feature for tagline.
    157161
    158 = 1.3.5 - 2025-09-19 =
     162= 1.3.5 - 2025-10-10 =
    159163* Google analytics improvement.
    160164* Memory detection fixes.
    161165
    162 = 1.3.3 - 2025-09-10 =
     166= 1.3.3 - 2025-09-14 =
    163167* Schema detection fixes.
    164168* Structure Improvement.
    165169
    166 = 1.3.2 - 2025-09-10 =
     170= 1.3.2 - 2025-09-11 =
    167171* Bug Fixes
    168172
  • site-suggest/trunk/site-suggest.php

    r3387629 r3390233  
    66 * Author: Blurr Studio
    77 * Author URI: https://blurr.it/
    8  * Version: 1.3.7
     8 * Version: 1.3.8
    99 * License: GPL v2 or later
    1010 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3636            define('stsgt_URL', plugin_dir_url(__FILE__));
    3737            define('stsgt_SLUG', 'site-suggest');
    38             define('stsgt_VERSION', '1.3.7');
     38            define('stsgt_VERSION', '1.3.8');
    3939        }
    4040
Note: See TracChangeset for help on using the changeset viewer.