Changeset 3318243
- Timestamp:
- 06/26/2025 12:22:36 PM (9 months ago)
- Location:
- site-suggest
- Files:
-
- 32 added
- 8 edited
-
tags/1.2.0 (added)
-
tags/1.2.0/app (added)
-
tags/1.2.0/app/ajax-controller.php (added)
-
tags/1.2.0/app/cron-controller.php (added)
-
tags/1.2.0/app/info-controller.php (added)
-
tags/1.2.0/app/main-controller.php (added)
-
tags/1.2.0/assets (added)
-
tags/1.2.0/assets/css (added)
-
tags/1.2.0/assets/css/style.css (added)
-
tags/1.2.0/assets/js (added)
-
tags/1.2.0/assets/js/script.js (added)
-
tags/1.2.0/index.php (added)
-
tags/1.2.0/license.txt (added)
-
tags/1.2.0/readme.txt (added)
-
tags/1.2.0/site-suggest.php (added)
-
tags/1.2.0/vendor (added)
-
tags/1.2.0/vendor/DetectLanguage (added)
-
tags/1.2.0/vendor/DetectLanguage/Client.php (added)
-
tags/1.2.0/vendor/DetectLanguage/DetectLanguage.php (added)
-
tags/1.2.0/vendor/DetectLanguage/Error.php (added)
-
tags/1.2.0/vendor/detectlanguage.php (added)
-
tags/1.2.0/views (added)
-
tags/1.2.0/views/admin (added)
-
tags/1.2.0/views/admin-parts (added)
-
tags/1.2.0/views/admin-parts/admin-settings-fields.php (added)
-
tags/1.2.0/views/admin-parts/admin-site-info.php (added)
-
tags/1.2.0/views/admin/admin-robots-txt.php (added)
-
tags/1.2.0/views/admin/admin-server.php (added)
-
tags/1.2.0/views/admin/admin-settings.php (added)
-
tags/1.2.0/views/admin/admin-tool-content.php (added)
-
tags/1.2.0/views/admin/stsgt-log-single.php (added)
-
tags/1.2.0/views/admin/stsgt-log.php (added)
-
trunk/app/ajax-controller.php (modified) (5 diffs)
-
trunk/app/cron-controller.php (modified) (1 diff)
-
trunk/app/info-controller.php (modified) (3 diffs)
-
trunk/app/main-controller.php (modified) (1 diff)
-
trunk/assets/js/script.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/site-suggest.php (modified) (2 diffs)
-
trunk/views/admin/admin-tool-content.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
site-suggest/trunk/app/ajax-controller.php
r3316726 r3318243 119 119 $resp = []; 120 120 if (isset($_POST['_']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_'])), 'stsgt_nonce')) { 121 update_option('stsgt_real_cron_obsv_started', false); 122 update_option('stsgt_real_cron_obsv_post_page', 1); 123 update_option('stsgt_real_cron_obsv_checklists', []); 124 update_option('stsgt_real_cron_obsv_post_ids', []); 125 update_option('stsgt_cron_progress', 0); 126 update_option('stsgt_cron_total_progress', 0); 127 update_option('stsgt_checked_schema_markups', []); 121 $checkname = isset($_POST['checkname']) ? sanitize_text_field(wp_unslash($_POST['checkname'])) : ''; 122 $prev_checklist = get_option('stsgt_real_cron_obsv_checklists', []); 123 $checkname_index = array_search($checkname, $prev_checklist); 124 if($checkname_index !== null && isset($prev_checklist[$checkname_index])){ 125 unset($prev_checklist[$checkname_index]); 126 } 127 update_option('stsgt_real_cron_obsv_checklists', $prev_checklist); 128 129 if(empty($prev_checklist)){ 130 update_option('stsgt_real_cron_obsv_started', true); 131 update_option('stsgt_real_cron_obsv_post_page', 1); 132 update_option('stsgt_real_cron_obsv_post_ids', []); 133 update_option('stsgt_cron_progress', 0); 134 update_option('stsgt_cron_total_progress', 0); 135 update_option('stsgt_checked_schema_markups', []); 136 } 128 137 $resp = ['status' => 200, 'message' => 'Updated!']; 129 138 } else { … … 300 309 $checklist = isset($_POST['checklist']) ? json_decode(base64_decode(sanitize_text_field(wp_unslash($_POST['checklist']))), true) : []; 301 310 $post_ids = isset($_POST['post_ids']) ? json_decode(base64_decode(sanitize_text_field(wp_unslash($_POST['post_ids']))), true) : []; 302 311 $prev_checklist = get_option('stsgt_real_cron_obsv_checklists', []); 312 313 $checklist = array_merge($checklist, $prev_checklist); 314 303 315 update_option('stsgt_real_cron_obsv_started', 1); 304 305 316 update_option('stsgt_real_cron_obsv_checklists', $checklist); 306 317 update_option('stsgt_real_cron_obsv_post_ids', $post_ids); … … 675 686 update_option('stsgt_cron_progress', $cron_progress); 676 687 $rlcrn_obsv_psts = array_slice($real_cron_obsv_post_ids, ($real_cron_obsv_post_page - 1), 1); 688 689 add_filter('http_request_timeout', function (){ 690 return ceil(floatval(100)); 691 }); 677 692 678 693 $resp = []; … … 1039 1054 $audit_type = isset($_POST['audit_type']) ? sanitize_text_field(wp_unslash($_POST['audit_type'])) : ''; 1040 1055 1041 $cron_observers = ['http_links', 'h 1_checker', 'image_size_checker']; //, 'enabled_reCaptcha'];1056 $cron_observers = ['http_links', 'has_broken_links', 'image_size_checker', 'h1_checker']; //, 'enabled_reCaptcha']; 1042 1057 $current_cron_observers = get_option('stsgt_cron_observers', []); 1043 1058 … … 1057 1072 } 1058 1073 1059 $general_tab_keys = ['custom_login_url', ' enabled_indexing', 'enabled_SMTP', 'wordpress_version', 'PHP_version', 'PHP_Memory_Limit', 'plugin_security_risk', 'theme', 'ssl_set_up', 'activated_plugins', 'plugin_update', 'enabled_favicon', 'enabled_google_analytics', 'enabled_google_tags', 'has_cookie_banner', 'has_CDNs', 'enabled_reCaptcha', 'lorem_ipsum_checker', 'privacy_policy_page', 'cookie_notice_page'];1074 $general_tab_keys = ['custom_login_url', 'memory_limit_suggestion', 'enabled_indexing', 'enabled_SMTP', 'wordpress_version', 'PHP_version', 'PHP_Memory_Limit', 'plugin_security_risk', 'theme', 'ssl_set_up', 'activated_plugins', 'plugin_update', 'enabled_favicon', 'enabled_google_analytics', 'enabled_google_tags', 'has_cookie_banner', 'has_CDNs', 'enabled_reCaptcha', 'lorem_ipsum_checker', 'privacy_policy_page', 'cookie_notice_page']; 1060 1075 $performance_tab_keys = ['desktop_page_speed', 'mobile_page_speed', 'server_response_time', 'accessibility', 'enabled_cache', 'revisions', 'drafts', 'trash', 'spam_comment', 'trash_comment', 'transients', 'Non_webp_images']; 1061 1076 $seo_tab_keys = ['enabled_seo_plugin', 'admin_username_check', 'html_lang', 'sitemap_exist', 'www_and_non_www_check', 'sitemap_listed_in_robotstxt_file', 'check_canonical_tags', 'check_schema_markup']; -
site-suggest/trunk/app/cron-controller.php
r3316726 r3318243 24 24 public function add_custom_cron_intervals($schedules) { 25 25 $schedules['stsgt_every_sec'] = array( 26 'interval' => 60,26 'interval' => 1, 27 27 'display' => esc_html__('Site Suggest Every Sec', 'site-suggest'), 28 28 ); -
site-suggest/trunk/app/info-controller.php
r3316726 r3318243 65 65 $audit_data['custom_login_url'] = $this->check_custom_login_url($this->url); 66 66 break; 67 case 'memory_limit_suggestion': 68 $audit_data['memory_limit_suggestion'] = $this->check_memory_limit_suggestion(); 69 break; 67 70 case 'PHP_version': 68 71 $audit_data['PHP_version'] = $this->get_php_version(); … … 202 205 $audit_data['wordpress_version'] = $this->get_wordpress_version($this->url); 203 206 $audit_data['custom_login_url'] = $this->check_custom_login_url($this->url); 207 $audit_data['memory_limit_suggestion'] = $this->check_memory_limit_suggestion(); 204 208 $audit_data['PHP_version'] = $this->get_php_version(); 205 209 $audit_data['PHP_Memory_Limit'] = $this->get_php_memory_limit(); … … 409 413 } 410 414 415 public function ss_convert_to_mb($size) { 416 $unit = strtoupper(substr($size, -1)); 417 $value = (int) $size; 418 419 switch ($unit) { 420 case 'G': return $value * 1024; 421 case 'M': return $value; 422 case 'K': return $value / 1024; 423 default: return (int) $size; 424 } 425 } 426 427 public function check_memory_limit_suggestion(){ 428 $current_limit = ini_get('memory_limit'); 429 $current_mb = $this->ss_convert_to_mb($current_limit); 430 $recommended = 256; 431 432 $sgst_limit = ''; 433 if($current_mb < $recommended){ 434 $sgst_limit = 'Should increase current memory limit (Current '.$current_mb.')'; 435 }else{ 436 $sgst_limit = 'Current Limit '.$current_mb; 437 } 438 return $sgst_limit; 439 } 440 411 441 public function get_server_response_time($url, $api_key) 412 442 { -
site-suggest/trunk/app/main-controller.php
r3315256 r3318243 630 630 $all_post_ids = $this->get_all_post_ids(); 631 631 632 $general_check_list = ['custom_login_url', ' enabled_indexing', 'enabled_SMTP', 'wordpress_version', 'PHP_version', 'PHP_Memory_Limit', 'plugin_security_risk', 'theme', 'ssl_set_up', 'activated_plugins', 'plugin_update', 'enabled_favicon', 'enabled_google_analytics', 'enabled_google_tags', 'has_cookie_banner', 'has_CDNs', 'enabled_reCaptcha', 'lorem_ipsum_checker', 'privacy_policy_page', 'cookie_notice_page'];632 $general_check_list = ['custom_login_url', 'memory_limit_suggestion', 'enabled_indexing', 'enabled_SMTP', 'wordpress_version', 'PHP_version', 'PHP_Memory_Limit', 'plugin_security_risk', 'theme', 'ssl_set_up', 'activated_plugins', 'plugin_update', 'enabled_favicon', 'enabled_google_analytics', 'enabled_google_tags', 'has_cookie_banner', 'has_CDNs', 'enabled_reCaptcha', 'lorem_ipsum_checker', 'privacy_policy_page', 'cookie_notice_page']; 633 633 $performance_check_list = ['desktop_page_speed', 'mobile_page_speed', 'server_response_time', 'accessibility', 'enabled_cache', 'revisions', 'drafts', 'trash', 'spam_comment', 'trash_comment', 'transients', 'Non_webp_images']; 634 634 $seo_check_list = ['enabled_seo_plugin', 'admin_username_check', 'html_lang', 'sitemap_exist', 'www_and_non_www_check', 'sitemap_listed_in_robotstxt_file', 'check_canonical_tags', 'check_schema_markup']; -
site-suggest/trunk/assets/js/script.js
r3298092 r3318243 918 918 jQuery(document).on('click', '.trigger_single_cron_pause', function () { 919 919 const this_btn = jQuery(this); 920 const this_check = jQuery(this_btn.parents('li').get(0)); 921 const this_checkname = this_check.attr('stsgt_check_name'); 920 922 this_btn.css({ 921 923 opacity: 0.6, … … 927 929 data: { 928 930 action: 'reset_scanning_process', 931 checkname: this_checkname, 929 932 _: stsgt_ajax_object.stsgt_nonce 930 933 } -
site-suggest/trunk/readme.txt
r3316726 r3318243 4 4 Tested up to: 6.8 5 5 Requires PHP: 8.0 6 Stable tag: 1. 1.96 Stable tag: 1.2.0 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 146 146 == Changelog == 147 147 148 = 1.2.0 - 2025-06-26 = 149 * New feature memory limit suggestion 150 * Optimized timeout events 151 * Bug fixes 152 148 153 = 1.1.9 - 2025-06-24 = 149 154 * Bug fixes -
site-suggest/trunk/site-suggest.php
r3316726 r3318243 6 6 * Author: Blurr Studio 7 7 * Author URI: https://blurr.it/ 8 * Version: 1. 1.98 * Version: 1.2.0 9 9 * License: GPL v2 or later 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 36 36 define('stsgt_URL', plugin_dir_url(__FILE__)); 37 37 define('stsgt_SLUG', 'site-suggest'); 38 define('stsgt_VERSION', '1. 1.9');38 define('stsgt_VERSION', '1.2.0'); 39 39 } 40 40 -
site-suggest/trunk/views/admin/admin-tool-content.php
r3315158 r3318243 139 139 140 140 $is_404_page = false; 141 $general_tab_keys = ['custom_login_url', ' enabled_indexing', 'enabled_SMTP', 'wordpress_version', 'PHP_version', 'PHP_Memory_Limit', 'plugin_security_risk', 'theme', 'ssl_set_up', 'activated_plugins', 'plugin_update', 'enabled_favicon', 'enabled_google_analytics', 'enabled_google_tags', 'has_cookie_banner', 'has_CDNs', 'enabled_reCaptcha', 'lorem_ipsum_checker', 'privacy_policy_page', 'cookie_notice_page'];141 $general_tab_keys = ['custom_login_url', 'memory_limit_suggestion', 'enabled_indexing', 'enabled_SMTP', 'wordpress_version', 'PHP_version', 'PHP_Memory_Limit', 'plugin_security_risk', 'theme', 'ssl_set_up', 'activated_plugins', 'plugin_update', 'enabled_favicon', 'enabled_google_analytics', 'enabled_google_tags', 'has_cookie_banner', 'has_CDNs', 'enabled_reCaptcha', 'lorem_ipsum_checker', 'privacy_policy_page', 'cookie_notice_page']; 142 142 143 143 $performance_tab_keys = ['desktop_page_speed', 'mobile_page_speed', 'server_response_time', 'accessibility', 'enabled_cache', 'revisions', 'drafts', 'trash', 'spam_comment', 'trash_comment', 'transients', 'Non_webp_images'];
Note: See TracChangeset
for help on using the changeset viewer.