| @@ -50,9 +50,9 @@ | ||
| 50 | 50 | add_action( 'wp_dashboard_setup', array( $this, 'widget_action' ) ); |
| 51 | 51 | add_action('admin_enqueue_scripts', [ $this, 'enqueue'] ); |
| 52 | 52 | } |
| 53 | 53 | public function enqueue( $hook ){ |
| 54 | - wp_register_style( 'nx-analytics-dashboard-widget', self::ASSET_URL . 'css/analytics-dashboard-widget.css', array(), false, 'all' ); | |
| 54 | + wp_register_style( 'nx-analytics-dashboard-widget', self::ASSET_URL . 'css/analytics-dashboard-widget.css', array(), NOTIFICATIONX_VERSION, 'all' ); | |
| 55 | 55 | } |
| 56 | 56 | /** |
| 57 | 57 | * Admin Action callback |
| 58 | 58 | * for wp_dashboard_setup |
| @@ -72,8 +72,9 @@ | ||
| 72 | 72 | */ |
| 73 | 73 | public function analytics_counter(){ |
| 74 | 74 | global $wpdb; |
| 75 | 75 | |
| 76 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- False positive: the query is prepared via $this->wpdb->prepare(), which this sniff does not recognise, and only $wpdb->prefix table names are interpolated. Audited 2026-07-16. | |
| 76 | 77 | $results = $wpdb->get_row( |
| 77 | 78 | "SELECT *, ( clicks/views ) * 100 as ctr FROM ( SELECT SUM(views) as views, SUM(clicks) as clicks FROM {$wpdb->prefix}nx_stats ) AS STATS", |
| 78 | 79 | ARRAY_A |
| 79 | 80 | ); |