Changeset 2653466
- Timestamp:
- 01/06/2022 07:46:13 AM (3 years ago)
- Location:
- issues-tracker
- Files:
-
- 277 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
issues-tracker/trunk/.gitignore
r2558364 r2653466 1 ./vendor 1 *.DS_Store 2 3 4 .vscode/* 5 !.vscode/settings.json 6 !.vscode/tasks.json 7 !.vscode/launch.json 8 !.vscode/extensions.json 9 !.vscode/*.code-snippets 10 11 # Local History for Visual Studio Code 12 .history/ 13 14 # Built Visual Studio Code Extensions 15 *.vsix -
issues-tracker/trunk/assets/js/app.js
r2610317 r2653466 6 6 case 'issues-tracker-dashboard': 7 7 import("./components/dashboard.js"); 8 ist rk_sendComponentEvent('dashboard')8 ist_sendComponentEvent('dashboard') 9 9 break; 10 10 case 'issues-tracker-log-viewer': 11 11 import("./components/log-view.js"); 12 ist rk_sendComponentEvent('log view')12 ist_sendComponentEvent('log view') 13 13 break; 14 14 case 'issues-tracker-advisor': 15 15 import("./components/advisor.js"); 16 ist rk_sendComponentEvent('advisor')16 ist_sendComponentEvent('advisor') 17 17 break; 18 18 case 'issues-tracker-404': 19 19 import("./components/404.js"); 20 ist rk_sendComponentEvent('404')20 ist_sendComponentEvent('404') 21 21 22 22 } 23 23 24 24 25 function ist rk_sendComponentEvent(component) {25 function ist_sendComponentEvent(component) { 26 26 27 27 try { -
issues-tracker/trunk/controllers/AdvisorController.php
r2612917 r2653466 55 55 echo json_encode([ 56 56 'success' => false, 57 'error' => 'Email was not passed'57 'error' => 58 58 ]); 59 59 wp_die(); … … 94 94 public static function istkr_advisor_checks_handler() 95 95 { 96 if (ist rk()->is_premium()) {96 if (ist()->is_premium()) { 97 97 98 98 $notification_email = get_option('istkr_advisor_notifications_email'); -
issues-tracker/trunk/controllers/HooksController.php
r2612917 r2653466 11 11 { 12 12 13 $istrk_index_file = plugin_dir_path(__DIR__) . 'index.php'; 13 $istkr_index_file = plugin_dir_path(__DIR__) . 'index.php'; 14 // add_action('plugins_loaded', function () { 15 16 // $p = WP_PLUGIN_DIR . '/issues-tracker/languages'; 17 // load_plugin_textdomain('istkr', false, $p); 18 // }); 14 19 15 20 // Include styles and scripts in Issues Tracker plugin's pages only 16 21 add_action('admin_enqueue_scripts', ['ISTKR_HooksController', 'istkr_admin_assets_enqueue']); 17 22 18 register_activation_hook($ist rk_index_file, ['ISTKR_ServiceController', 'istrk_activation_events']);19 register_deactivation_hook($ist rk_index_file, ['ISTKR_ServiceController', 'istrk_deactivation_events']);20 register_uninstall_hook($ist rk_index_file, ['ISTKR_ServiceController', 'istrk_uninstall_events']);23 register_activation_hook($ist_activation_events']); 24 register_deactivation_hook($ist_deactivation_events']); 25 register_uninstall_hook($ist_uninstall_events']); 21 26 22 27 … … 34 39 35 40 add_action('wp', function () { 36 if (ist rk()->is_premium()) {41 if (ist()->is_premium()) { 37 42 if (!wp_next_scheduled('istkr_advisor_checks')) { 38 43 wp_schedule_event(time() + 3600, 'daily', 'istkr_advisor_checks'); -
issues-tracker/trunk/controllers/LogController.php
r2612917 r2653466 12 12 { 13 13 14 public static $istkr_debug_file_path = WP_CONTENT_DIR . '/debug.log';15 14 public static $database_directory = WP_CONTENT_DIR . './issues-tracker-db'; 16 15 … … 18 17 { 19 18 return ISTKR_LogView::istkr_render_view(); 19 20 21 22 23 24 25 26 27 28 29 20 30 } 21 31 … … 105 115 'success' => true, 106 116 'data' => [ 107 'notice' => 'N/A',108 'warning' => 'N/A',109 'fatal' => 'N/A',110 'database' => 'N/A',111 'total' => 'N/A',112 'filesize' => 'N/A',117 'notice' => , 118 'warning' => , 119 'fatal' => , 120 'database' => , 121 'total' => , 122 'filesize' => , 113 123 ] 114 124 ]); -
issues-tracker/trunk/controllers/MenuController.php
r2608782 r2653466 14 14 15 15 $role = 'edit_pages'; 16 add_menu_page(__('Dashboard', 'i t'), __('Issues tracker', 'it'), $role, 'issues-tracker-dashboard', ['ISTKR_DashboardController', 'istkr_render_view'], plugin_dir_url(__FILE__) . '/../../assets/img/logo.svg');16 add_menu_page(__('Dashboard', 'i'), $role, 'issues-tracker-dashboard', ['ISTKR_DashboardController', 'istkr_render_view'], plugin_dir_url(__FILE__) . '/../../assets/img/logo.svg'); 17 17 18 add_submenu_page('issues-tracker-dashboard', 'Issues tracker dashboard', 'Dashboard', $role, 'issues-tracker-dashboard', ['ISTKR_DashboardController', 'istkr_render_view']);18 add_submenu_page('issues-tracker-dashboard', , $role, 'issues-tracker-dashboard', ['ISTKR_DashboardController', 'istkr_render_view']); 19 19 20 add_submenu_page('issues-tracker-dashboard', 'Debug log viewer', 'Log viewer', $role, 'issues-tracker-log-viewer', ['ISTKR_LogController', 'istkr_render_view']);20 add_submenu_page('issues-tracker-dashboard', , $role, 'issues-tracker-log-viewer', ['ISTKR_LogController', 'istkr_render_view']); 21 21 22 add_submenu_page('issues-tracker-dashboard', 'Security advisor', 'Advisor', $role, 'issues-tracker-advisor', ['ISTKR_AdvisorController', 'istkr_render_view']);22 add_submenu_page('issues-tracker-dashboard', , $role, 'issues-tracker-advisor', ['ISTKR_AdvisorController', 'istkr_render_view']); 23 23 24 add_submenu_page('issues-tracker-dashboard', '404 logger', '404', $role, 'issues-tracker-404', ['ISTKR_404Controller', 'istkr_render_view']);24 add_submenu_page('issues-tracker-dashboard', , $role, 'issues-tracker-404', ['ISTKR_404Controller', 'istkr_render_view']); 25 25 } 26 26 } -
issues-tracker/trunk/index.php
r2622620 r2653466 2 2 3 3 /** 4 * Plugin Name: Issues Tracker 4 * Plugin Name: Issues Tracker 5 5 * Description: Plugin for debugging, catching 404 and advices to improve the security of the site 6 6 * Author: lysyiweb 7 * Version: 1.0. 67 * Version: 1.0. 8 8 * Tags: debug, issues, tracker, logs, advisor, notifications, security, health, 404, not found 9 9 * Requires PHP: 5.4 10 * Stable tag: 1.0. 610 * Stable tag: 1.0. 11 11 * License: GPLv2 or later 12 12 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 16 16 } 17 17 18 if ( !function_exists( 'ist rk' ) ) {18 if ( !function_exists( 'ist' ) ) { 19 19 // Create a helper function for easy SDK access. 20 function ist rk()20 function ist() 21 21 { 22 global $ist rk;22 global $ist ; 23 23 24 if ( !isset( $ist rk) ) {24 if ( !isset( $ist ) ) { 25 25 // Include Freemius SDK. 26 26 require_once dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php'; 27 $ist rk= fs_dynamic_init( array(27 $ist = fs_dynamic_init( array( 28 28 'id' => '8570', 29 29 'slug' => 'issues-tracker', … … 43 43 } 44 44 45 return $ist rk;45 return $ist; 46 46 } 47 47 48 48 // Init Freemius. 49 ist rk();49 ist(); 50 50 // Signal that SDK was initiated. 51 do_action( 'ist rk_loaded' );51 do_action( 'ist_loaded' ); 52 52 } 53 53 -
issues-tracker/trunk/models/LogModel.php
r2608782 r2653466 12 12 { 13 13 14 $path = ISTKR_LogController:: $istkr_debug_file_path;14 $path = ISTKR_LogController::; 15 15 16 16 if (!file_exists($path) || !is_file($path)) { … … 36 36 { 37 37 preg_match_all('/\[(.*?)\]/m', $row, $matches, PREG_SET_ORDER, 0); 38 return isset($matches[0][1]) ? $matches[0][1] : 'N\A';38 return isset($matches[0][1]) ? $matches[0][1] : ; 39 39 } 40 40 … … 42 42 { 43 43 preg_match_all('/(on line |php:)(\d{1,})/m', $row, $matches, PREG_SET_ORDER, 0); 44 return isset($matches[0][2]) ? $matches[0][2] : 'N/A';44 return isset($matches[0][2]) ? $matches[0][2] : ; 45 45 } 46 46 … … 48 48 { 49 49 preg_match_all('/ in (.*?)( on line |:)\d{1,}/m', $row, $matches, PREG_SET_ORDER, 0); 50 return isset($matches[0][1]) ? $matches[0][1] : 'N/A';50 return isset($matches[0][1]) ? $matches[0][1] : ; 51 51 } 52 52 … … 71 71 $re = '/WordPress database error (.*)/m'; 72 72 preg_match_all($re, $row, $matches, PREG_SET_ORDER, 0); 73 return isset($matches[0]) && $matches[0][1] ? $matches[0][1] : 'n/a';73 return isset($matches[0]) && $matches[0][1] ? $matches[0][1] : ; 74 74 } else { 75 75 76 76 $re = '/ (PHP Notice:|PHP Warning:|PHP Fatal error:)(.*?)(\[ | in |on line)/m'; 77 77 preg_match_all($re, $row, $matches, PREG_SET_ORDER, 0); 78 return isset($matches[0]) && $matches[0][2] ? $matches[0][2] : 'n/a';78 return isset($matches[0]) && $matches[0][2] ? $matches[0][2] : ; 79 79 } 80 80 } … … 83 83 { 84 84 85 $debug_filepath = ISTKR_LogController:: $istkr_debug_file_path;85 $debug_filepath = ISTKR_LogController::; 86 86 87 87 if (is_file($debug_filepath) && filesize($debug_filepath)) { 88 88 $filesize_in_mb = filesize($debug_filepath) / 1024 / 1024; 89 return $with_measure_units ? round($filesize_in_mb, 2) . ' Mb': round($filesize_in_mb, 2);89 return $with_measure_units ? round($filesize_in_mb, 2) . ' : round($filesize_in_mb, 2); 90 90 } else { 91 91 return 0; -
issues-tracker/trunk/readme.txt
r2622620 r2653466 1 1 === Issues Tracker === 2 2 3 Contributors: lysyiWeb 3 Contributors: lysyiWeb 4 4 Tags: debug, issues, tracker, logs, advisor, notifications, security, health, 404, not found 5 5 Requires at least: 4.6 6 6 Tested up to: 5.8.2 7 Stable tag: 1.0. 67 Stable tag: 1.0. 8 8 Requires PHP: 5.4 9 9 License: GPLv2 … … 11 11 12 12 == Description == 13 Issues tracker made for security checks, convenient view of debug.log and track 404 URLs on your site.13 Issues tracker 14 14 15 15 Contain four components: 16 16 17 17 **Dashboard** 18 Component where you can quickly view basic information about the number of entries in the log file, or about the remaining performance or security problems18 s 19 19 20 20 **Log viewer** 21 Component that allows you to view information about notices, warning or errors in the WordPress log file as a table. The presence of search and pagination makes this processquick and convenient.21 quick and convenient. 22 22 23 23 **Advisor** 24 Get recommendations for improving the speed and security of your site in one place. In Pro version supports daily notifications when some checks is failed24 Get recommendations 25 25 26 26 **404 catcher** 27 Get list of all 404 that occurred on your website. 28 27 We list all 404s (not found) errors on your site, and allow you to set email notifications on every 404 29 28 30 29 == Installation == … … 54 53 == Changelog == 55 54 56 = 1.0.5 = 55 = 1.0.7 = 56 * Log viewer: added support of logs with overrided path in WP_DEBUG_LOG('path/to/log.txt'); 57 * General: added ability to translate an interface of the plugin 58 59 = 1.0.6 = 57 60 * 404: Fixed "loading" when no data presented in the table 58 61 * Advisor: minor fixes -
issues-tracker/trunk/views/header.php
r2608782 r2653466 14 14 </div> 15 15 16 <div class="collapse navbar-collapse" id="ist rk_navbarNav">16 <div class="collapse navbar-collapse" id="ist_navbarNav"> 17 17 <ul class="navbar-nav"> 18 18 <li class="nav-item"> … … 31 31 </div> 32 32 <?php 33 if (ist rk()->is_premium()) { ?>34 <a class="pro" href="<?php echo ist rk()->get_upgrade_url(); ?>">33 if (ist()->is_premium()) { ?> 34 <a class="pro" href="<?php echo ist()->get_upgrade_url(); ?>"> 35 35 <span><?php _e('You\'re Pro', 'istkr'); ?></span> 36 36 <img src="<?php echo plugin_dir_url(__DIR__) . 'assets/img/corona.png' ?>"> 37 37 </a> 38 38 <?php } else { ?> 39 <a class="pro" href="<?php echo ist rk()->get_upgrade_url(); ?>">39 <a class="pro" href="<?php echo ist()->get_upgrade_url(); ?>"> 40 40 <span><?php _e('Get pro features', 'istkr'); ?></span> 41 41 <img src="<?php echo plugin_dir_url(__DIR__) . 'assets/img/corona.png' ?>"> -
issues-tracker/trunk/views/pages/advisor.php
r2612917 r2653466 186 186 <div class="col-md-3"> 187 187 <h5>Notification</h5> 188 <?php if (ist rk()->is_premium()) { ?>188 <?php if (ist()->is_premium()) { ?> 189 189 190 190 <form id="istkr_advisor_notifications_form" data-notifications-enabled="<?php echo get_option('istkr_advisor_notifications_email') ? 'true' : 'false' ?>"> -
issues-tracker/trunk/views/pages/dashboard.php
r2612917 r2653466 41 41 42 42 <div class="info" style="display: flex; justify-content: space-between;"> 43 <p class="filesize">Log size: <span class="count">N \A</span></p>44 <p class="total-errors" style="padding: 0px 10px;">Total errors: <span class="count">N \A</span></p>43 <p class="filesize">Log size: <span class="count">NA</span></p> 44 <p class="total-errors" style="padding: 0px 10px;">Total errors: <span class="count">NA</span></p> 45 45 </div> 46 46 … … 58 58 59 59 <div class="info" style="display: flex; justify-content: space-between;"> 60 <p>Passed: <span class="count">N \A</span></p>61 <p style="padding: 0px 10px;">Failed: <span class="count">N \A</span></p>60 <p>Passed: <span class="count">NA</span></p> 61 <p style="padding: 0px 10px;">Failed: <span class="count">NA</span></p> 62 62 </div> 63 63 <a href="<?php echo admin_url(); ?>admin.php?page=issues-tracker-advisor" class="btn btn-sm btn-info">Open</a> … … 73 73 <p class="card-text">The component displays 404 URLs catched on the website, and set notification if 404 will be catched</p> 74 74 <div class="info" style="display: flex; justify-content: space-between;"> 75 <p class="success">Catched 404: <span class="count">N \A</span></p>75 <p class="success">Catched 404: <span class="count">NA</span></p> 76 76 <p class="danger" style="padding: 0px 10px;">Notifications: <span class="count"><?php echo get_option('istkr_404_notifications_email') ? 'Enabled' : 'Disabled' ?></span></p> 77 77 </div> -
issues-tracker/trunk/views/pages/log.php
r2608782 r2653466 35 35 <div class="row"> 36 36 <div class="col-xs-12 log-filepath"> 37 <p>Path: <span class=""><?php echo ISTKR_LogController:: $istkr_debug_file_path; ?></span></p>37 <p>Path: <span class=""><?php echo ISTKR_LogController::; ?></span></p> 38 38 </div> 39 39 </div> … … 44 44 if (ISTKR_LogModel::istkr_get_log_filesize(false) > 100) { ?> 45 45 46 <h5 class="log-filesize-limitation">The log file is too large to be processes by WP Issue tracker. Current limitation is 100 Mb</h5>46 <h5 class="log-filesize-limitation">The log file is too large to be processes by racker. Current limitation is 100 Mb</h5> 47 47 48 48 <?php return; … … 50 50 51 51 <?php 52 $path = ISTKR_LogController:: $istkr_debug_file_path;52 $path = ISTKR_LogController::; 53 53 54 54 if (!file_exists($path) || !is_file($path)) { ?>
Note: See TracChangeset
for help on using the changeset viewer.