Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : May 18, 2026

CVE-2026-42639: GD Rating System <= 3.6.2 – Unauthenticated SQL Injection (gd-rating-system)

Severity High (CVSS 7.5)
CWE 89
Vulnerable Version 3.6.2
Patched Version 3.7
Disclosed April 28, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-42639:

This vulnerability is an unauthenticated SQL Injection in the GD Rating System plugin for WordPress, affecting versions up to and including 3.6.2. The issue resides in the AJAX handler files where the ‘operation’ parameter from user input was directly used in SQL queries without proper sanitization. This allows unauthenticated attackers to inject arbitrary SQL into existing queries, potentially extracting sensitive database information. The CVSS score of 7.5 reflects the high impact on confidentiality without requiring authentication.

Root Cause:

The vulnerability exists in multiple AJAX handler files within the plugin. The core files affected are: gd-rating-system/core/admin/ajax.php (lines 35 and 101), and gd-rating-system/core/admin/cron.php (line 66 and others). The primary issue is in the $_POST[‘operation’] parameter which was directly assigned to the $operation variable without any sanitization. In the vulnerable code, $operation = $_POST[‘operation’] passes the raw user input directly into a switch statement that constructs SQL queries. The cron.php file shows the problematic pattern at lines 53-55 where the $max parameter is interpolated directly into an SQL string: “b.`rating` = FLOOR(b.`rating` * (” . $max . “/b.`max`))”. Similarly, multiple WHERE clause constructions in the same file use unsanitized parameters like $object[‘method’], $object[‘entity’], and $object[‘name’] (lines 58-66).

Exploitation:

An attacker can trigger this vulnerability by sending a POST request to the WordPress AJAX endpoint at /wp-admin/admin-ajax.php. The attacker would set the action parameter to a handler that processes the ‘operation’ parameter, such as the transfer or maintenance operations. By injecting SQL payloads into the ‘operation’ parameter or related parameters like ‘max’, ‘method’, ‘entity’, or ‘name’, the attacker can manipulate the constructed SQL queries. For example, sending operation=start’+UNION+SELECT+*+FROM+wp_users– causes the unsanitized value to be included directly in the SQL query. The attack does not require authentication as the AJAX endpoints are accessible without login checks.

Patch Analysis:

The patch introduces the d4p_sanitize_key_expanded() function call for the operation parameter in all three locations within ajax.php. This function sanitizes and validates the input, removing or encoding malicious SQL characters before the value reaches the SQL query. In cron.php, the patch adds trailing commas to array elements (a PHP syntax fix) and changes the function call gdrts_admin_cron::recalculate_max_changed_single_type( $object, true ) to gdrts_admin_cron::recalculate_max_changed_single_type( $object ), removing the boolean parameter. The critical fix is the addition of d4p_sanitize_key_expanded() which ensures that only safe alphanumeric characters and underscores are allowed, preventing any SQL injection through these parameters.

Impact:

Successful exploitation allows an unauthenticated attacker to execute arbitrary SQL commands on the database. This can lead to extraction of sensitive data including user credentials, session tokens, and other confidential information stored in the WordPress database. The attacker could potentially modify or delete data, escalate privileges, or leverage the SQL access for further attacks against the web server. The vulnerability does not require any authentication, making it particularly dangerous for sites using the plugin.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/gd-rating-system/core/admin/ajax.php
+++ b/gd-rating-system/core/admin/ajax.php
@@ -31,7 +31,7 @@

 		require_once( GDRTS_PATH . 'core/admin/transfer.php' );

-		$operation = $_POST['operation'];
+		$operation = d4p_sanitize_key_expanded( $_POST['operation'] );

 		switch ( $operation ) {
 			case 'start':
@@ -98,7 +98,7 @@
 		@ini_set( 'memory_limit', '256M' );
 		@set_time_limit( 0 );

-		$operation = $_POST['operation'];
+		$operation = d4p_sanitize_key_expanded( $_POST['operation'] );

 		switch ( $operation ) {
 			case 'start':
@@ -243,7 +243,7 @@

 		require_once( GDRTS_PATH . 'core/admin/maintenance.php' );

-		$operation = $_POST['operation'];
+		$operation = d4p_sanitize_key_expanded( $_POST['operation'] );

 		switch ( $operation ) {
 			case 'break':
--- a/gd-rating-system/core/admin/cron.php
+++ b/gd-rating-system/core/admin/cron.php
@@ -27,10 +27,10 @@
 					'name'   => $type,
 					'method' => 'stars-rating',
 					'series' => '',
-					'max'    => $settings['stars']
+					'max'    => $settings['stars'],
 				);

-				gdrts_admin_cron::recalculate_max_changed_single_type( $object, true );
+				gdrts_admin_cron::recalculate_max_changed_single_type( $object );
 			}
 		}
 	}
@@ -39,14 +39,14 @@
 		$max = $object['max'];

 		$set = array(
-			"b.`rating` = FLOOR(b.`rating` * (" . $max . "/b.`max`))"
+			"b.`rating` = FLOOR(b.`rating` * (" . $max . "/b.`max`))",
 		);

 		$where = array(
 			"b.`method` = '" . $object['method'] . "'",
 			"i.`entity` = '" . $object['entity'] . "'",
 			"i.`name` = '" . $object['name'] . "'",
-			"b.`max` != " . $max
+			"b.`max` != " . $max,
 		);

 		if ( $sum ) {
@@ -78,12 +78,12 @@
 			'stars-rating' => array(
 				'items',
 				'votes',
-				'rating'
+				'rating',
 			),
 			'like-this'    => array(
 				'items',
-				'rating'
-			)
+				'rating',
+			),
 		);

 		$old = gdrts_settings()->group_get( 'entities' );
@@ -130,7 +130,7 @@
 				$results[ $row->entity ][ $method ] = array(
 					'items'  => $row->items,
 					'votes'  => $row->votes,
-					'rating' => round( $row->rating / $normalize, 2 )
+					'rating' => round( $row->rating / $normalize, 2 ),
 				);
 			}

@@ -155,7 +155,7 @@
 				$results[ $type ][ $method ] = array(
 					'items'  => $row->items,
 					'votes'  => $row->votes,
-					'rating' => round( $row->rating / $normalize, 2 )
+					'rating' => round( $row->rating / $normalize, 2 ),
 				);
 			}
 		}
@@ -183,7 +183,7 @@
 			foreach ( $data as $row ) {
 				$results[ $row->entity ][ $method ] = array(
 					'items'  => $row->items,
-					'rating' => $row->rating
+					'rating' => $row->rating,
 				);
 			}

@@ -206,7 +206,7 @@

 				$results[ $type ][ $method ] = array(
 					'items'  => $row->items,
-					'rating' => $row->rating
+					'rating' => $row->rating,
 				);
 			}
 		}
--- a/gd-rating-system/core/admin/functions.php
+++ b/gd-rating-system/core/admin/functions.php
@@ -13,7 +13,7 @@
 		'style'    => '',
 		'multi'    => false,
 		'echo'     => true,
-		'readonly' => false
+		'readonly' => false,
 	);
 	$args     = wp_parse_args( $args, $defaults );
 	extract( $args );
@@ -24,11 +24,11 @@
 	$id         = d4p_html_id_from_name( $name, $id );

 	if ( $class != '' ) {
-		$attributes[] = 'class="' . esc_attr(sanitize_html_class($class)) . '"';
+		$attributes[] = 'class="' . esc_attr( d4p_sanitize_html_classes( $class ) ) . '"';
 	}

 	if ( $style != '' ) {
-		$attributes[] = 'style="' . esc_attr($style) . '"';
+		$attributes[] = 'style="' . esc_attr( $style ) . '"';
 	}

 	if ( $multi ) {
--- a/gd-rating-system/core/admin/getback.php
+++ b/gd-rating-system/core/admin/getback.php
@@ -28,7 +28,7 @@
 			}

 			if ( $_GET['single-action'] == 'enable-rule' ) {
-				$this->rule_activation( true );
+				$this->rule_activation();
 			}
 		}

@@ -165,7 +165,7 @@

 			gdrts_admin_maintenance::recalculate_rating_object( $item_id, $method, $series, array(
 				'rating',
-				'distribution'
+				'distribution',
 			) );

 			$url .= '&message=recalculated';
--- a/gd-rating-system/core/admin/grids.php
+++ b/gd-rating-system/core/admin/grids.php
@@ -7,7 +7,7 @@
 class gdrts_admin_grids {
 	public $options = array(
 		'gdrts_rows_ratings_per_page',
-		'gdrts_rows_votes_per_page'
+		'gdrts_rows_votes_per_page',
 	);

 	public function __construct() {
@@ -37,14 +37,14 @@
 			if ( $_GET['page'] === 'gd-rating-system-ratings' ) {
 				add_action( 'load-rating-system_page_gd-rating-system-ratings', array(
 					$this,
-					'screen_options_grid_rows_ratings'
+					'screen_options_grid_rows_ratings',
 				) );
 			}

 			if ( $_GET['page'] === 'gd-rating-system-log' ) {
 				add_action( 'load-rating-system_page_gd-rating-system-log', array(
 					$this,
-					'screen_options_grid_rows_votes'
+					'screen_options_grid_rows_votes',
 				) );
 			}
 		}
@@ -54,7 +54,7 @@
 		$args = array(
 			'label'   => __( 'Rows', 'gd-rating-system' ),
 			'default' => 25,
-			'option'  => 'gdrts_rows_ratings_per_page'
+			'option'  => 'gdrts_rows_ratings_per_page',
 		);

 		add_screen_option( 'per_page', $args );
@@ -68,7 +68,7 @@
 		$args = array(
 			'label'   => __( 'Rows', 'gd-rating-system' ),
 			'default' => 25,
-			'option'  => 'gdrts_rows_votes_per_page'
+			'option'  => 'gdrts_rows_votes_per_page',
 		);

 		add_screen_option( 'per_page', $args );
--- a/gd-rating-system/core/admin/help.php
+++ b/gd-rating-system/core/admin/help.php
@@ -30,7 +30,7 @@
 				'id'      => 'gdbbx-help-info',
 				'title'   => __( 'Help & Support', 'gd-rating-system' ),
 				'content' => '<h2>' . __( 'Help & Support', 'gd-rating-system' ) . '</h2><p>' . __( 'To get help with this plugin, you can start with Knowledge Base list of frequently asked questions, user guides, articles (tutorials) and reference guide (for developers).', 'gd-rating-system' ) .
-				             '</p><p><a href="https://support.dev4press.com/kb/product/' . gdrts_admin()->plugin . '/" class="button-primary" target="_blank">' . __( 'Knowledge Base', 'gd-rating-system' ) . '</a> <a href="https://support.dev4press.com/forums/forum/plugins/' . gdrts_admin()->plugin . '/" class="button-secondary" target="_blank">' . __( 'Support Forum', 'gd-rating-system' ) . '</a></p>'
+				             '</p><p><a href="https://support.dev4press.com/kb/product/' . gdrts_admin()->plugin . '/" class="button-primary" target="_blank">' . __( 'Knowledge Base', 'gd-rating-system' ) . '</a> <a href="https://support.dev4press.com/forums/forum/plugins/' . gdrts_admin()->plugin . '/" class="button-secondary" target="_blank">' . __( 'Support Forum', 'gd-rating-system' ) . '</a></p>',
 			)
 		);

@@ -40,7 +40,7 @@
 				'title'   => __( 'Found a bug?', 'gd-rating-system' ),
 				'content' => '<h2>' . __( 'Found a bug?', 'gd-rating-system' ) . '</h2><p>' . __( 'If you find a bug in GD Rating System, you can report it in the support forum.', 'gd-rating-system' ) .
 				             '</p><p>' . __( 'Before reporting a bug, make sure you use latest plugin version, your website and server meet system requirements. And, please be as descriptive as possible, include server side logged errors, or errors from browser debugger.', 'gd-rating-system' ) .
-				             '</p><p><a href="https://support.dev4press.com/forums/forum/plugins/' . gdrts_admin()->plugin . '/" class="button-primary" target="_blank">' . __( 'Open new topic', 'gd-rating-system' ) . '</a></p>'
+				             '</p><p><a href="https://support.dev4press.com/forums/forum/plugins/' . gdrts_admin()->plugin . '/" class="button-primary" target="_blank">' . __( 'Open new topic', 'gd-rating-system' ) . '</a></p>',
 			)
 		);
 	}
@@ -59,7 +59,7 @@
 			array(
 				'id'      => 'gdrts-help-types',
 				'title'   => __( 'Rating Types', 'gd-rating-system' ),
-				'content' => $render
+				'content' => $render,
 			)
 		);
 	}
@@ -72,7 +72,7 @@
 		$render .= '<ul>';
 		$render .= '<li>' . __( 'Deleting votes from the log will recalculate object ratings. If you delete one vote, plugin will take previous vote by the user for the object, if available. This way it is undoing the revoting.', 'gd-rating-system' ) . '</li>';
 		$render .= '<li>' . __( 'Each vote that is replacing previous vote (revote) hold reference to vote it replaces. If you break this chain, plugin will not be able to correctly calculate the correct rating. In general, it is not recommend to mess with the votes at all if you want to maintain the correct votes and revotes log.', 'gd-rating-system' ) . '</li>';
-		$render .= '<li>' . __( 'It is not recommended to use 'Remove from Log' option because it will just remove log entry, it will not recaulcaulte object rating. If you don't understand this option, do not use it. This option is disabled by default, and it can be enabled from plugin settings.', 'gd-rating-system' ) . '</li>';
+		$render .= '<li>' . __( 'It is not recommended to use 'Remove from Log' option because it will just remove log entry, it will not recalculate object rating. If you don't understand this option, do not use it. This option is disabled by default, and it can be enabled from plugin settings.', 'gd-rating-system' ) . '</li>';
 		$render .= '<li>' . __( 'If log takes too long to load, disable GEO Location flags for votes IP's from plugin settings.', 'gd-rating-system' ) . '</li>';
 		$render .= '<li>' . __( 'Do not mess with votes log in database directly, or you might delete something that will cause problems to the way plugin works.', 'gd-rating-system' ) . '</li>';
 		$render .= '</ul>';
@@ -81,7 +81,7 @@
 			array(
 				'id'      => 'gdrts-help-log',
 				'title'   => __( 'Votes Log', 'gd-rating-system' ),
-				'content' => $render
+				'content' => $render,
 			)
 		);
 	}
@@ -101,7 +101,7 @@
 			array(
 				'id'      => 'gdrts-help-rules',
 				'title'   => __( 'Rules', 'gd-rating-system' ),
-				'content' => $render
+				'content' => $render,
 			)
 		);
 	}
--- a/gd-rating-system/core/admin/install.php
+++ b/gd-rating-system/core/admin/install.php
@@ -15,7 +15,7 @@
 		$wpdb->prefix . 'gdrts_items_basic' => 9,
 		$wpdb->prefix . 'gdrts_logmeta'     => 4,
 		$wpdb->prefix . 'gdrts_logs'        => 12,
-		$wpdb->prefix . 'gdrts_cache'       => 6
+		$wpdb->prefix . 'gdrts_cache'       => 6,
 	);

 	return array_merge( $tables, apply_filters( 'gdrts_database_tables_list', array() ) );
@@ -34,7 +34,7 @@
 		'items_basic' => $wpdb->prefix . 'gdrts_items_basic',
 		'logmeta'     => $wpdb->prefix . 'gdrts_logmeta',
 		'logs'        => $wpdb->prefix . 'gdrts_logs',
-		'cache'       => $wpdb->prefix . 'gdrts_cache'
+		'cache'       => $wpdb->prefix . 'gdrts_cache',
 	);

 	$query = "CREATE TABLE " . $tables['itemmeta'] . " (
@@ -157,7 +157,7 @@
 			if ( $count != count( $columns ) ) {
 				$result[ $table ] = array(
 					"status" => "error",
-					"msg"    => __( 'Some columns are missing.', 'gd-rating-system' )
+					"msg"    => __( 'Some columns are missing.', 'gd-rating-system' ),
 				);
 			} else {
 				$result[ $table ] = array( "status" => "ok" );
--- a/gd-rating-system/core/admin/internal.php
+++ b/gd-rating-system/core/admin/internal.php
@@ -37,15 +37,15 @@
 		$extensions = array(
 			'extensions_methods' => array(
 				'name'     => __( 'Rating Methods', 'gd-rating-system' ),
-				'settings' => array()
+				'settings' => array(),
 			),
 			'extensions_addons'  => array( 'name' => __( 'Basic Addons', 'gd-rating-system' ), 'settings' => array() ),
 			'extensions_pro'     => array(
 				'name'     => __( 'More rating methods and addons', 'gd-rating-system' ),
 				'settings' => array(
-					new d4pSettingElement( '', '', 'GD Rating System Pro', 'You can upgrade to GD Rating System Pro <a target="_blank" href="https://plugins.dev4press.com/gd-rating-system/">here</a>. <p style="font-weight: normal; margin: 10px 0 0;">To learn more about the features available in Pro version only, check out this <a target="_blank" href="https://plugins.dev4press.com/gd-rating-system/free-vs-pro-plugin/">FREE vs. PRO</a> comparison.</p>', d4pSettingType::INFO )
-				)
-			)
+					new d4pSettingElement( '', '', 'GD Rating System Pro', 'You can upgrade to GD Rating System Pro <a target="_blank" href="https://plugins.dev4press.com/gd-rating-system/">here</a>. <p style="font-weight: normal; margin: 10px 0 0;">To learn more about the features available in a Pro version only, check out this <a target="_blank" href="https://plugins.dev4press.com/gd-rating-system/free-vs-pro-plugin/">FREE vs. PRO</a> comparison.</p>', d4pSettingType::INFO ),
+				),
+			),
 		);

 		foreach ( gdrts()->methods as $method => $obj ) {
@@ -71,28 +71,28 @@
 				'global_log'          => array(
 					'name'     => __( 'Votes Log', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'log_vote_user_agent', __( 'Save User Agent', 'gd-rating-system' ), __( 'User agent string can take a lot of space in the database, and they represent user browser or application used to vote.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'log_vote_user_agent' ) )
-					)
+						new d4pSettingElement( 'settings', 'log_vote_user_agent', __( 'Save User Agent', 'gd-rating-system' ), __( 'User agent string can take a lot of space in the database, and they represent user browser or application used to vote.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'log_vote_user_agent' ) ),
+					),
 				),
 				'global_anonymous'    => array(
 					'name'     => __( 'Anonymous Ratings', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'settings', 'annonymous_verify', __( 'Verification', 'gd-rating-system' ), __( 'If the user voting is visitor (not logged in), there are different methods to verify if visitor can vote.', 'gd-rating-system' ), d4pSettingType::SELECT, gdrts_settings()->get( 'annonymous_verify' ), 'array', $this->data_list_annonymous_verify() ),
-						new d4pSettingElement( 'settings', 'annonymous_same_ip', __( 'IP Validation', 'gd-rating-system' ), __( 'If logged user and visitor (not logged in) share IP, this option determines if visitor can vote.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'annonymous_same_ip' ), null, array(), array( 'label' => __( 'Allow visitor to have same IP as logged user', 'gd-rating-system' ) ) )
-					)
+						new d4pSettingElement( 'settings', 'annonymous_same_ip', __( 'IP Validation', 'gd-rating-system' ), __( 'If logged user and visitor (not logged in) share IP, this option determines if visitor can vote.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'annonymous_same_ip' ), null, array(), array( 'label' => __( 'Allow visitor to have same IP as logged user', 'gd-rating-system' ) ) ),
+					),
 				),
 				'global_ajax'         => array(
 					'name'     => __( 'AJAX Requests', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'ajax_header_no_cache', __( 'Set no cache header', 'gd-rating-system' ), '', d4pSettingType::BOOLEAN, gdrts_settings()->get( 'ajax_header_no_cache' ) )
-					)
+						new d4pSettingElement( 'settings', 'ajax_header_no_cache', __( 'Set no cache header', 'gd-rating-system' ), '', d4pSettingType::BOOLEAN, gdrts_settings()->get( 'ajax_header_no_cache' ) ),
+					),
 				),
 				'global_calculations' => array(
 					'name'     => __( 'Calculations', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'decimal_round', __( 'Decimal rounding', 'gd-rating-system' ), '', d4pSettingType::SELECT, gdrts()->decimals(), 'array', $this->data_list_decimal_points() )
-					)
-				)
+						new d4pSettingElement( 'settings', 'decimal_round', __( 'Decimal rounding', 'gd-rating-system' ), '', d4pSettingType::SELECT, gdrts()->decimals(), 'array', $this->data_list_decimal_points() ),
+					),
+				),
 			),
 			'jscss'          => array(
 				'jscss_load' => array(
@@ -102,151 +102,151 @@
 						new d4pSettingElement( 'settings', 'load_on_demand', __( 'Load on Demand', 'gd-rating-system' ), __( 'If active, plugin will attempt to load CSS and JS files only when the rating block or other rating elements are actually rendered on the page. This might not work with all themes or third party plugins!', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'load_on_demand' ) ),
 						new d4pSettingElement( '', '', __( 'Load full JS and CSS files', 'gd-rating-system' ), '', d4pSettingType::HR ),
 						new d4pSettingElement( 'settings', 'load_full_css', __( 'Full CSS', 'gd-rating-system' ), __( 'By default, plugin loads one shared CSS file, and each method can loads own CSS file. If this option is enabled, plugin will load only one big minified file with styling for all methods.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'load_full_css' ) ),
-						new d4pSettingElement( 'settings', 'load_full_js', __( 'Full JS', 'gd-rating-system' ), __( 'By default, plugin loads one shared JS file, and each method loads own JS file. If this option is enabled, plugin will load only one big minified file with JS for all methods.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'load_full_js' ) )
-					)
+						new d4pSettingElement( 'settings', 'load_full_js', __( 'Full JS', 'gd-rating-system' ), __( 'By default, plugin loads one shared JS file, and each method loads own JS file. If this option is enabled, plugin will load only one big minified file with JS for all methods.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'load_full_js' ) ),
+					),
 				),
 				'jscss_font' => array(
 					'name'     => __( 'Fonts Loading', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'load_font_embed', __( 'With embedded fonts', 'gd-rating-system' ), __( 'If active, plugin will load the font version that has WOFF and WOFF2 fonts embedded in the CSS file, and it will load faster for most browsers.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'load_font_embed' ) )
-					)
-				)
+						new d4pSettingElement( 'settings', 'load_font_embed', __( 'With embedded fonts', 'gd-rating-system' ), __( 'If active, plugin will load the font version that has WOFF and WOFF2 fonts embedded in the CSS file, and it will load faster for most browsers.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'load_font_embed' ) ),
+					),
+				),
 			),
 			'security'       => array(
 				'security_throttle' => array(
 					'name'     => __( 'Throttle Protection', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'throttle_active', __( 'Use Throttle Protection', 'gd-rating-system' ), __( 'Throttle protection will prevent user to vote more than once in a specified period of time. This will prevent a lot of voting fraud and attemps of automted voting, and can be potentially used as a security issue flag.', 'gd-rating-system' ) . ' ' . __( 'For logged in users, throttle will be applied to the user by ID, for guests it will be applied to the user by IP and/or cookie.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'throttle_active' ) ),
-						new d4pSettingElement( 'settings', 'throttle_period', __( 'Throttle Period', 'gd-rating-system' ), __( 'Throttle time (in seconds) between two votes.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'throttle_period' ) )
-					)
+						new d4pSettingElement( 'settings', 'throttle_active', __( 'Use Throttle Protection', 'gd-rating-system' ), __( 'Throttle protection will prevent user to vote more than once in a specified period of time. This will prevent a lot of voting fraud and attempts of automated voting, and can be potentially used as a security issue flag.', 'gd-rating-system' ) . ' ' . __( 'For logged in users, throttle will be applied to the user by ID, for guests it will be applied to the user by IP and/or cookie.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'throttle_active' ) ),
+						new d4pSettingElement( 'settings', 'throttle_period', __( 'Throttle Period', 'gd-rating-system' ), __( 'Throttle time (in seconds) between two votes.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'throttle_period' ) ),
+					),
 				),
 				'security_nonce'    => array(
 					'name'     => __( 'Nonce Protection', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'use_nonce', __( 'Use Nonce Protection', 'gd-rating-system' ), __( 'Each AJAX rating request will be protected by Nonce for additional security. But, if you use cache plugins, Nonce check will fail if the cached pages are too old.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'use_nonce' ) )
-					)
+						new d4pSettingElement( 'settings', 'use_nonce', __( 'Use Nonce Protection', 'gd-rating-system' ), __( 'Each AJAX rating request will be protected by Nonce for additional security. But, if you use cache plugins, Nonce check will fail if the cached pages are too old.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'use_nonce' ) ),
+					),
 				),
 				'security_ip_md5'   => array(
 					'name'     => __( 'Use hashed IP', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'settings', 'log_vote_ip_hashed', __( 'MD5 hashed IP', 'gd-rating-system' ), __( 'IP addresses will be saved as MD5 hashes so that you never save the real IP in the database to protect voter privacy. The plugin can use MD5 versions of IP for comparison purposes. But, you will no longer have the IP column in the votes log or a way to get geo IP location for voters.', 'gd-rating-system' ) . ' <strong>' .
-						                                                                                                    __( 'Once the IP is stored as MD5 string, it can't be reveresed anymore!', 'gd-rating-system' ) . '</strong>', d4pSettingType::BOOLEAN, gdrts_settings()->get( 'log_vote_ip_hashed' ) )
-					)
-				)
+						                                                                                                    __( 'Once the IP is stored as MD5 string, it can't be reversed anymore!', 'gd-rating-system' ) . '</strong>', d4pSettingType::BOOLEAN, gdrts_settings()->get( 'log_vote_ip_hashed' ) ),
+					),
+				),
 			),
 			'debug'          => array(
 				'debug_debug' => array(
 					'name'     => __( 'Debug Info', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'debug_rating_block', __( 'Add into rating block', 'gd-rating-system' ), __( 'This will include various useful information into each rating block for debug purposes.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'debug_rating_block' ) )
-					)
+						new d4pSettingElement( 'settings', 'debug_rating_block', __( 'Add into rating block', 'gd-rating-system' ), __( 'This will include various useful information into each rating block for debug purposes.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'debug_rating_block' ) ),
+					),
 				),
 				'debug_files' => array(
 					'name'     => __( 'Files', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'debug_files', __( 'Load CSS and JS', 'gd-rating-system' ), __( 'If set to 'Force load sources', plugin will load source files. If set to 'Auto load', plugin will load minified files, or source files, based on the SCRIPT_DEBUG value from WP Config.', 'gd-rating-system' ), d4pSettingType::SELECT, gdrts_settings()->get( 'debug_files' ), 'array', $this->data_list_debug_files() )
-					)
+						new d4pSettingElement( 'settings', 'debug_files', __( 'Load CSS and JS', 'gd-rating-system' ), __( 'If set to 'Force load sources', plugin will load source files. If set to 'Auto load', plugin will load minified files, or source files, based on the SCRIPT_DEBUG value from WP Config.', 'gd-rating-system' ), d4pSettingType::SELECT, gdrts_settings()->get( 'debug_files' ), 'array', $this->data_list_debug_files() ),
+					),
 				),
 				'debug_js'    => array(
 					'name'     => __( 'JavaScript', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'debug_ajax_error', __( 'AJAX Errors', 'gd-rating-system' ), __( 'Control how the AJAX errors are handled.', 'gd-rating-system' ), d4pSettingType::SELECT, gdrts_settings()->get( 'debug_ajax_error' ), 'array', $this->data_list_ajax_errors() )
-					)
-				)
+						new d4pSettingElement( 'settings', 'debug_ajax_error', __( 'AJAX Errors', 'gd-rating-system' ), __( 'Control how the AJAX errors are handled.', 'gd-rating-system' ), d4pSettingType::SELECT, gdrts_settings()->get( 'debug_ajax_error' ), 'array', $this->data_list_ajax_errors() ),
+					),
+				),
 			),
 			'cache'          => array(
 				'cache_global'    => array(
 					'name'     => __( 'Global', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'db_cache_time_global', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_global' ) )
-					)
+						new d4pSettingElement( 'settings', 'db_cache_time_global', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_global' ) ),
+					),
 				),
 				'cache_aggregate' => array(
 					'name'     => __( 'Aggregation System', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'settings', 'db_cache_on_aggregate', __( 'Status', 'gd-rating-system' ), __( 'Each aggregation query result will be stored to cache. These queries can be slow, depending on the size of the rating database, and it is highly recommended to cache the results.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'db_cache_on_aggregate' ), null, array(), array( 'label' => __( 'Enable Cache', 'gd-rating-system' ) ) ),
-						new d4pSettingElement( 'settings', 'db_cache_time_aggregate', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_aggregate' ) )
-					)
+						new d4pSettingElement( 'settings', 'db_cache_time_aggregate', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_aggregate' ) ),
+					),
 				),
 				'cache_period'    => array(
 					'name'     => __( 'Period Query System', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'settings', 'db_cache_on_period', __( 'Status', 'gd-rating-system' ), __( 'Each date period query result will be stored to cache. These queries can be slow, depending on the size of the rating database, and it is highly recommended to cache the results.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'db_cache_on_period' ), null, array(), array( 'label' => __( 'Enable Cache', 'gd-rating-system' ) ) ),
-						new d4pSettingElement( 'settings', 'db_cache_time_period', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_period' ) )
-					)
+						new d4pSettingElement( 'settings', 'db_cache_time_period', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_period' ) ),
+					),
 				),
 				'cache_query'     => array(
 					'name'     => __( 'Main Query System', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'settings', 'db_cache_on_query', __( 'Status', 'gd-rating-system' ), __( 'Each main period query result will be stored to cache.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'db_cache_on_query' ), null, array(), array( 'label' => __( 'Enable Cache', 'gd-rating-system' ) ) ),
-						new d4pSettingElement( 'settings', 'db_cache_time_query', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_query' ) )
-					)
-				)
+						new d4pSettingElement( 'settings', 'db_cache_time_query', __( 'Cache Time to Live', 'gd-rating-system' ), __( 'Time (in seconds) for the cache entry to remain in cache before expiration.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'db_cache_time_query' ) ),
+					),
+				),
 			),
 			'administration' => array(
 				'administration_metaboxes'   => array(
 					'name'     => __( 'Rating Metabox', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'metaboxes_post_types', __( 'Show for post types', 'gd-rating-system' ), __( 'All posts belonging to selected post types will show the rating metabox that can be used to override various rating settings and related data.', 'gd-rating-system' ), d4pSettingType::CHECKBOXES, gdrts_settings()->get( 'metaboxes_post_types' ), 'array', $this->data_list_valid_post_types() )
-					)
+						new d4pSettingElement( 'settings', 'metaboxes_post_types', __( 'Show for post types', 'gd-rating-system' ), __( 'All posts belonging to selected post types will show the rating metabox that can be used to override various rating settings and related data.', 'gd-rating-system' ), d4pSettingType::CHECKBOXES, gdrts_settings()->get( 'metaboxes_post_types' ), 'array', $this->data_list_valid_post_types() ),
+					),
 				),
 				'administration_votes'       => array(
 					'name'     => __( 'Votes Log', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'admin_log_remove', __( 'Show Remove from Log', 'gd-rating-system' ), __( 'Remove from log option is used for raw removal of votes from log, and it doesn't affect the rating object agregated results. If you don't understand how this works, do not use this option.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'admin_log_remove' ) )
-					)
+						new d4pSettingElement( 'settings', 'admin_log_remove', __( 'Show Remove from Log', 'gd-rating-system' ), __( 'Remove from log option is used for raw removal of votes from log, and it doesn't affect the rating object aggregated results. If you don't understand how this works, do not use this option.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'admin_log_remove' ) ),
+					),
 				),
 				'administration_metabox'     => array(
 					'name'     => __( 'Metabox', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'metabox_override', __( 'Show Override tab', 'gd-rating-system' ), __( 'Set override title and URL.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'metabox_override' ) )
-					)
+						new d4pSettingElement( 'settings', 'metabox_override', __( 'Show Override tab', 'gd-rating-system' ), __( 'Set override title and URL.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'metabox_override' ) ),
+					),
 				),
 				'administration_transfer'    => array(
 					'name'     => __( 'Transfer Data', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'step_transfer', __( 'Records per Call', 'gd-rating-system' ), __( 'Number of records to process with each call.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'step_transfer' ) )
-					)
+						new d4pSettingElement( 'settings', 'step_transfer', __( 'Records per Call', 'gd-rating-system' ), __( 'Number of records to process with each call.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'step_transfer' ) ),
+					),
 				),
 				'administration_recalculate' => array(
 					'name'     => __( 'Recalculation', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'settings', 'step_recalculate', __( 'Records per Call', 'gd-rating-system' ), __( 'Number of records to process with each call.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'step_recalculate' ) )
-					)
-				)
+						new d4pSettingElement( 'settings', 'step_recalculate', __( 'Records per Call', 'gd-rating-system' ), __( 'Number of records to process with each call.', 'gd-rating-system' ), d4pSettingType::ABSINT, gdrts_settings()->get( 'step_recalculate' ) ),
+					),
+				),
 			),
 			'widgets'        => array(
 				'widgets_disabled' => array(
 					'name'     => __( 'Disable Widgets', 'gd-rating-system' ),
 					'settings' => array(
-						new d4pSettingElement( 'early', 'disable_widgets', __( 'Disabled', 'gd-rating-system' ), __( 'All checked widgets in this list will be disabled. If you used any of these widgets, when disabled, they will be removed from wherever they were used.', 'gd-rating-system' ), d4pSettingType::CHECKBOXES, gdrts_settings()->get( 'disable_widgets', 'early' ), 'array', $this->data_list_all_widgets() )
-					)
-				)
+						new d4pSettingElement( 'early', 'disable_widgets', __( 'Disabled', 'gd-rating-system' ), __( 'All checked widgets in this list will be disabled. If you used any of these widgets, when disabled, they will be removed from wherever they were used.', 'gd-rating-system' ), d4pSettingType::CHECKBOXES, gdrts_settings()->get( 'disable_widgets', 'early' ), 'array', $this->data_list_all_widgets() ),
+					),
+				),
 			),
 			'maintenance'    => array(
 				'maintenance_disabled'    => array(
 					'name'     => __( 'Disable Voting', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'core', 'voting_disabled', __( 'Status', 'gd-rating-system' ), __( 'This option will disable all voting.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'voting_disabled', 'core' ), null, array(), array( 'label' => __( 'Disable Voting', 'gd-rating-system' ) ) ),
-						new d4pSettingElement( 'core', 'voting_disabled_message', __( 'Message', 'gd-rating-system' ), __( 'If you want, you can set the message to be displayed with rating blocks if the voting is disabled.', 'gd-rating-system' ), d4pSettingType::TEXT, gdrts_settings()->get( 'voting_disabled_message', 'core' ) )
-					)
+						new d4pSettingElement( 'core', 'voting_disabled_message', __( 'Message', 'gd-rating-system' ), __( 'If you want, you can set the message to be displayed with rating blocks if the voting is disabled.', 'gd-rating-system' ), d4pSettingType::TEXT, gdrts_settings()->get( 'voting_disabled_message', 'core' ) ),
+					),
 				),
 				'maintenance_maintenance' => array(
 					'name'     => __( 'Maintenance Mode', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'core', 'maintenance', __( 'Status', 'gd-rating-system' ), __( 'This option will disable all voting.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'maintenance', 'core' ), null, array(), array( 'label' => __( 'Disable Voting', 'gd-rating-system' ) ) ),
-						new d4pSettingElement( 'core', 'maintenance_message', __( 'Message', 'gd-rating-system' ), __( 'If you want, you can set the message to be displayed with rating blocks if the voting is disabled.', 'gd-rating-system' ), d4pSettingType::TEXT, gdrts_settings()->get( 'maintenance_message', 'core' ) )
-					)
+						new d4pSettingElement( 'core', 'maintenance_message', __( 'Message', 'gd-rating-system' ), __( 'If you want, you can set the message to be displayed with rating blocks if the voting is disabled.', 'gd-rating-system' ), d4pSettingType::TEXT, gdrts_settings()->get( 'maintenance_message', 'core' ) ),
+					),
 				),
 				'maintenance_cron_job'    => array(
 					'name'     => __( 'Background Maintenance Job', 'gd-rating-system' ),
 					'settings' => array(
 						new d4pSettingElement( 'settings', 'cronjob_hour_of_day', __( 'Hour of the day to run', 'gd-rating-system' ), __( 'Maintenance job will run once a day at the specified hour. Set the time of day when you have smallest number of visitors (usually night time). Based on the server time.', 'gd-rating-system' ), d4pSettingType::SELECT, gdrts_settings()->get( 'cronjob_hour_of_day' ), 'array', $this->data_list_cronjob_hours() ),
 						new d4pSettingElement( '', '', __( 'Stars Changed Recalculation', 'gd-rating-system' ), '', d4pSettingType::HR ),
-						new d4pSettingElement( 'core', 'cronjob_recheck_max_stars_rating', __( 'Stars Rating', 'gd-rating-system' ), __( 'If you make changes to the number of stars for stars rating, enable this option to recalculate ratings during daily maintenance. This option will auto disable after it is done. It will be auto activated if number of stars change is detected.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'cronjob_recheck_max_stars_rating', 'core' ) )
-					)
-				)
-			)
+						new d4pSettingElement( 'core', 'cronjob_recheck_max_stars_rating', __( 'Stars Rating', 'gd-rating-system' ), __( 'If you make changes to the number of stars for stars rating, enable this option to recalculate ratings during daily maintenance. This option will auto disable after it is done. It will be auto activated if number of stars change is detected.', 'gd-rating-system' ), d4pSettingType::BOOLEAN, gdrts_settings()->get( 'cronjob_recheck_max_stars_rating', 'core' ) ),
+					),
+				),
+			),
 		) );
 	}

@@ -254,7 +254,7 @@
 		$widgets = array();

 		foreach ( gdrts_plugin()->widgets as $code => $widget ) {
-			$widgets[ $code ] = isset( $widget['label'] ) ? $widget['label'] : d4p_slug_to_name( $code, '-' );
+			$widgets[ $code ] = $widget['label'] ?? d4p_slug_to_name( $code, '-' );
 		}

 		return $widgets;
@@ -286,7 +286,7 @@
 	private function data_list_decimal_points() {
 		return array(
 			1 => __( 'One decimal', 'gd-rating-system' ),
-			2 => __( 'Two decimals', 'gd-rating-system' )
+			2 => __( 'Two decimals', 'gd-rating-system' ),
 		);
 	}

@@ -295,7 +295,7 @@
 			'ip_or_cookie'  => __( 'IP or Cookie', 'gd-rating-system' ),
 			'ip_and_cookie' => __( 'IP and Cookie', 'gd-rating-system' ),
 			'ip'            => __( 'IP Only', 'gd-rating-system' ),
-			'cookie'        => __( 'Cookie Only', 'gd-rating-system' )
+			'cookie'        => __( 'Cookie Only', 'gd-rating-system' ),
 		);
 	}

@@ -303,14 +303,14 @@
 		return array(
 			'hide'    => __( 'Hide', 'gd-rating-system' ),
 			'console' => __( 'Log to Console', 'gd-rating-system' ),
-			'alert'   => __( 'Show Alert', 'gd-rating-system' )
+			'alert'   => __( 'Show Alert', 'gd-rating-system' ),
 		);
 	}

 	private function data_list_debug_files() {
 		return array(
 			'auto'   => __( 'Auto load sources or minified', 'gd-rating-system' ),
-			'source' => __( 'Force load sources', 'gd-rating-system' )
+			'source' => __( 'Force load sources', 'gd-rating-system' ),
 		);
 	}

--- a/gd-rating-system/core/admin/maintenance.php
+++ b/gd-rating-system/core/admin/maintenance.php
@@ -11,20 +11,20 @@
 		$sql = "DELETE i, ib, im FROM " . gdrts_db()->items . " i
                 INNER JOIN " . gdrts_db()->items_basic . " ib ON ib.item_id = i.item_id
                 LEFT JOIN " . gdrts_db()->itemmeta . " im ON im.item_id = i.item_id
-                WHERE i.item_id in (" . join( ', ', $item_id ) . ")";
+                WHERE i.item_id in (" . join( ', ', array_map( 'absint', $item_id ) ) . ")";
 		gdrts_db()->query( $sql );

 		$sql = "DELETE l, lm FROM " . gdrts_db()->logs . " l
                 LEFT JOIN " . gdrts_db()->logmeta . " lm ON lm.log_id = l.log_id
-                WHERE l.item_id in (" . join( ', ', $item_id ) . ")";
+                WHERE l.item_id in (" . join( ', ', array_map( 'absint', $item_id ) ) . ")";
 		gdrts_db()->query( $sql );
 	}

 	public static function clear_rating_item_method( $item_id, $method = '', $series = '' ) {
 		$item_id = (array) $item_id;

-		$sql_items = "DELETE b FROM " . gdrts_db()->items_basic . " b WHERE b.item_id in (" . join( ', ', $item_id ) . ")";
-		$sql_logs  = "DELETE l FROM " . gdrts_db()->logs . " l WHERE l.item_id in (" . join( ', ', $item_id ) . ")";
+		$sql_items = "DELETE b FROM " . gdrts_db()->items_basic . " b WHERE b.item_id in (" . join( ', ', array_map( 'absint', $item_id ) ) . ")";
+		$sql_logs  = "DELETE l FROM " . gdrts_db()->logs . " l WHERE l.item_id in (" . join( ', ', array_map( 'absint', $item_id ) ) . ")";

 		if ( $method != '' ) {
 			$sql_items .= " AND b.method = '" . $method . "'";
@@ -43,7 +43,7 @@
 	public static function clear_rating_item_method_limited( $item_id, $method = '', $series = '' ) {
 		$item_id = (array) $item_id;

-		$sql_items = "DELETE b FROM " . gdrts_db()->items_basic . " b WHERE b.item_id in (" . join( ', ', $item_id ) . ")";
+		$sql_items = "DELETE b FROM " . gdrts_db()->items_basic . " b WHERE b.item_id in (" . join( ', ', array_map( 'absint', $item_id ) ) . ")";

 		if ( $method != '' ) {
 			$sql_items .= " AND b.method = '" . $method . "'";
@@ -107,7 +107,7 @@

 		$sql = "DELETE l, lm FROM " . gdrts_db()->logs . " l
                 LEFT JOIN " . gdrts_db()->logmeta . " lm ON lm.log_id = l.log_id
-                WHERE l.log_id in (" . join( ', ', $ids ) . ")";
+                WHERE l.log_id in (" . join( ', ', array_map( 'absint', $ids ) ) . ")";

 		gdrts_db()->query( $sql );
 	}
@@ -138,7 +138,7 @@
 			'items'     => 0,
 			'processed' => 0,
 			'saved'     => 0,
-			'cleared'   => 0
+			'cleared'   => 0,
 		);

 		foreach ( $objects as $obj ) {
@@ -180,7 +180,7 @@
 			"l.`status` = 'active'",
 			"l.`action` = 'like'",
 			"l.`method` = 'like-this'",
-			"l.`item_id` = " . $item->item_id
+			"l.`item_id` = " . $item->item_id,
 		);

 		$log    = gdrts_db()->get_log_items_filter( $rule );
--- a/gd-rating-system/core/admin/plugin.php
+++ b/gd-rating-system/core/admin/plugin.php
@@ -63,8 +63,8 @@
 			_e( 'This item is invalid.', 'gd-rating-system' );
 		} else {
 			$_gdrts_id    = $post->ID;
-			$_gdrts_title = $item->get( 'title', '' );
-			$_gdrts_url   = $item->get( 'url', '' );
+			$_gdrts_title = $item->get( 'title' );
+			$_gdrts_url   = $item->get( 'url' );

 			include( GDRTS_PATH . 'forms/meta/posts-override.php' );
 		}
@@ -148,7 +148,7 @@
 				if ( $post_type != 'attachment' && ( is_null( $allowed_types ) || ( is_array( $allowed_types ) && in_array( $post_type, $allowed_types ) ) ) ) {
 					add_meta_box( 'gdrts-metabox', __( 'GD Rating System', 'gd-rating-system' ), array(
 						$this,
-						'metabox_post'
+						'metabox_post',
 					), $post_type, 'normal', 'high' );
 				}
 			}
@@ -239,7 +239,7 @@
 			'log'         => array( 'title' => __( 'Votes Log', 'gd-rating-system' ), 'icon' => 'file-text-o' ),
 			'transfer'    => array( 'title' => __( 'Transfer Data', 'gd-rating-system' ), 'icon' => 'exchange' ),
 			'information' => array( 'title' => __( 'Information', 'gd-rating-system' ), 'icon' => 'info-circle' ),
-			'tools'       => array( 'title' => __( 'Tools', 'gd-rating-system' ), 'icon' => 'wrench' )
+			'tools'       => array( 'title' => __( 'Tools', 'gd-rating-system' ), 'icon' => 'wrench' ),
 		) );
 	}

@@ -304,12 +304,12 @@
 			wp_enqueue_style( 'gdrts-balloon', $this->file( 'css', 'admin/balloon' ), array(), gdrts_settings()->file_version() );
 			wp_enqueue_style( 'gdrts-plugin', $this->file( 'css', 'admin/plugin' ), array(
 				'd4plib-admin',
-				'gdrts-balloon'
+				'gdrts-balloon',
 			), gdrts_settings()->file_version() );

 			wp_enqueue_script( 'd4plib-shared', $this->file( 'js', 'shared', true ), array(
 				'jquery',
-				'wp-color-picker'
+				'wp-color-picker',
 			), D4P_VERSION, true );
 			wp_enqueue_script( 'd4plib-admin', $this->file( 'js', 'admin', true ), array( 'd4plib-shared' ), D4P_VERSION, true );
 			wp_enqueue_script( 'd4plib-limitkeypress', GDRTS_URL . 'd4plib/resources/libraries/jquery.limitkeypress.min.js', array(), gdrts_settings()->file_version(), true );
@@ -317,7 +317,7 @@
 			wp_enqueue_script( 'gdrts-plugin', $this->file( 'js', 'admin/plugin' ), array(
 				'd4plib-admin',
 				'd4plib-limitkeypress',
-				'jquery-ui-sortable'
+				'jquery-ui-sortable',
 			), gdrts_settings()->file_version(), true );

 			do_action( 'gdrts_admin_enqueue_scripts', $this->page, $this->panel );
@@ -356,7 +356,7 @@
 				'dialog_changelog'          => __( 'Changelog', 'gd-rating-system' ),
 				'button_stop'               => __( 'Stop Process', 'gd-rating-system' ),
 				'step_transfer'             => gdrts_settings()->get( 'step_transfer' ),
-				'step_recalculate'          => gdrts_settings()->get( 'step_recalculate' )
+				'step_recalculate'          => gdrts_settings()->get( 'step_recalculate' ),
 			) );

 			wp_localize_script( 'gdrts-plugin', 'gdrts_data', $_data );
@@ -378,7 +378,7 @@

 			wp_enqueue_script( 'd4plib-shared', $this->file( 'js', 'shared', true ), array(
 				'jquery',
-				'wp-color-picker'
+				'wp-color-picker',
 			), D4P_VERSION, true );
 			wp_enqueue_script( 'd4plib-metabox', $this->file( 'js', 'meta', true ), array( 'd4plib-shared' ), D4P_VERSION, true );
 			wp_enqueue_script( 'gdrts-metabox', $this->file( 'js', 'admin/meta' ), array( 'd4plib-metabox' ), gdrts_settings()->file_version(), true );
@@ -388,7 +388,7 @@
 			$_data = apply_filters( 'gdrts_admin_enqueue_scripts_posts_data', array(
 				'nonce'            => wp_create_nonce( 'gdrts-admin-internal' ),
 				'wp_version'       => GDRTS_WPV,
-				'flatpickr_locale' => $flatpickr_locale
+				'flatpickr_locale' => $flatpickr_locale,
 			) );

 			wp_localize_script( 'gdrts-metabox', 'gdrts_data', $_data );
@@ -403,7 +403,7 @@
 			wp_enqueue_style( 'd4plib-widgets', $this->file( 'css', 'widgets', true ), array(), D4P_VERSION );
 			wp_enqueue_script( 'd4plib-widgets', $this->file( 'js', 'widgets', true ), array(
 				'jquery',
-				'wp-color-picker'
+				'wp-color-picker',
 			), D4P_VERSION, true );

 			do_action( 'gdrts_admin_enqueue_scripts_widgets', $hook );
@@ -416,7 +416,7 @@
 				'string_media_image_title'   => __( 'Select Image', 'gd-rating-system' ),
 				'string_media_image_button'  => __( 'Use Selected Image', 'gd-rating-system' ),
 				'string_are_you_sure'        => __( 'Are you sure you want to do this?', 'gd-rating-system' ),
-				'string_image_not_selected'  => __( 'Image not selected.', 'gd-rating-system' )
+				'string_image_not_selected'  => __( 'Image not selected.', 'gd-rating-system' ),
 			) );
 		}
 	}
--- a/gd-rating-system/core/admin/postback.php
+++ b/gd-rating-system/core/admin/postback.php
@@ -264,8 +264,8 @@

 			$request = array(
 				'gdrtsvalue' => array(
-					'rules' => isset( $raw['settings'] ) ? $raw['settings'] : array()
-				)
+					'rules' => $raw['settings'] ?? array(),
+				),
 			);

 			$processor       = new d4pSettingsProcess( $settings );
@@ -274,7 +274,7 @@
 			$data = $processor->process( $request );

 			$rule->active   = isset( $raw['active'] ) && $raw['active'] == 'on';
-			$rule->settings = isset( $data['rules'] ) ? $data['rules'] : array();
+			$rule->settings = $data['rules'] ?? array();
 			$rule->filters  = array();

 			gdrts_settings()->save_rule( $rule, true );
--- a/gd-rating-system/core/admin/shared.php
+++ b/gd-rating-system/core/admin/shared.php
@@ -14,7 +14,7 @@
 			'disabled' => __( 'Disabled', 'gd-rating-system' ),
 			'latest'   => __( 'Latest Range', 'gd-rating-system' ),
 			'range'    => __( 'Custom Range', 'gd-rating-system' ),
-			'exact'    => __( 'Exact Match', 'gd-rating-system' )
+			'exact'    => __( 'Exact Match', 'gd-rating-system' ),
 		);
 	}

@@ -94,17 +94,17 @@
 		switch ( $method ) {
 			default:
 				$list = array(
-					'rating' => __( 'Rating', 'gd-rating-system' )
+					'rating' => __( 'Rating', 'gd-rating-system' ),
 				);
 				break;
 			case 'stars-rating':
 				$list = array(
-					'average' => __( 'Average', 'gd-rating-system' )
+					'average' => __( 'Average', 'gd-rating-system' ),
 				);
 				break;
 			case 'like-this':
 				$list = array(
-					'sum' => __( 'Sum', 'gd-rating-system' )
+					'sum' => __( 'Sum', 'gd-rating-system' ),
 				);
 				break;
 		}
@@ -124,7 +124,7 @@
 				'votes'   => __( 'Votes', 'gd-rating-system' ),
 				'item_id' => __( 'Item ID', 'gd-rating-system' ),
 				'id'      => __( 'Object ID', 'gd-rating-system' ),
-				'latest'  => __( 'Latest Vote', 'gd-rating-system' )
+				'latest'  => __( 'Latest Vote', 'gd-rating-system' ),
 			);

 		switch ( $method ) {
@@ -140,7 +140,7 @@
 	public static function data_list_order() : array {
 		return array(
 			'DESC' => __( 'Descending', 'gd-rating-system' ),
-			'ASC'  => __( 'Ascending', 'gd-rating-system' )
+			'ASC'  => __( 'Ascending', 'gd-rating-system' ),
 		);
 	}

@@ -185,7 +185,7 @@
 	public static function data_list_distributions() : array {
 		return array(
 			'normalized' => __( 'Normalized', 'gd-rating-system' ),
-			'exact'      => __( 'Exact', 'gd-rating-system' )
+			'exact'      => __( 'Exact', 'gd-rating-system' ),
 		);
 	}

@@ -195,7 +195,7 @@
 			50  => __( '50% - Half Star', 'gd-rating-system' ),
 			25  => __( '25% - One Quarter Star', 'gd-rating-system' ),
 			20  => __( '20% - One Fifth Star', 'gd-rating-system' ),
-			10  => __( '10% - One Tenth Star', 'gd-rating-system' )
+			10  => __( '10% - One Tenth Star', 'gd-rating-system' ),
 		);
 	}

@@ -203,7 +203,7 @@
 		$default_rules = array(
 			'single' => __( 'Basic', 'gd-rating-system' ) . ': ' . __( 'Single vote only', 'gd-rating-system' ),
 			'revote' => __( 'Basic', 'gd-rating-system' ) . ': ' . __( 'Single vote with revote', 'gd-rating-system' ),
-			'multi'  => __( 'Basic', 'gd-rating-system' ) . ': ' . __( 'Multiple votes', 'gd-rating-system' )
+			'multi'  => __( 'Basic', 'gd-rating-system' ) . ': ' . __( 'Multiple votes', 'gd-rating-system' ),
 		);

 		$custom_rules = apply_filters( 'gdrts_custom_vote_rules', array() );
@@ -220,7 +220,7 @@
 			'none'   => __( 'No alignment', 'gd-rating-system' ),
 			'left'   => __( 'Left', 'gd-rating-system' ),
 			'center' => __( 'Center', 'gd-rating-system' ),
-			'right'  => __( 'Right', 'gd-rating-system' )
+			'right'  => __( 'Right', 'gd-rating-system' ),
 		);
 	}
 }
--- a/gd-rating-system/core/admin/templates.php
+++ b/gd-rating-system/core/admin/templates.php
@@ -7,12 +7,12 @@
 class gdrts_admin_templates {
 	public static function scan_for_templates() : array {
 		$paths   = gdrts()->default_storages_paths();
-		$paths[] = TEMPLATEPATH;
-		$paths[] = TEMPLATEPATH . '/gdrts';
+		$paths[] = get_template_directory();
+		$paths[] = get_template_directory() . '/gdrts';

-		if ( STYLESHEETPATH != TEMPLATEPATH ) {
-			$paths[] = STYLESHEETPATH;
-			$paths[] = STYLESHEETPATH . '/gdrts';
+		if ( get_stylesheet_directory() != get_template_directory() ) {
+			$paths[] = get_stylesheet_directory();
+			$paths[] = get_stylesheet_directory() . '/gdrts';
 		}

 		$templates = array();
--- a/gd-rating-system/core/admin/upgrade.php
+++ b/gd-rating-system/core/admin/upgrade.php
@@ -26,7 +26,7 @@
 			'type'   => $type,
 			'error'  => '',
 			'insert' => 0,
-			'delete' => 0
+			'delete' => 0,
 		);

 		$status = gdrts_db()->query( $insert );
--- a/gd-rating-system/core/build.php
+++ b/gd-rating-system/core/build.php
@@ -1 +1 @@
-<?php $build = 996;
 No newline at end of file
+<?php $build = 1000;
 No newline at end of file
--- a/gd-rating-system/core/grids/database.php
+++ b/gd-rating-system/core/grids/database.php
@@ -11,7 +11,7 @@
 		parent::__construct( array(
 			'singular' => 'table',
 			'plural'   => 'tables',
-			'ajax'     => false
+			'ajax'     => false,
 		) );
 	}

@@ -20,7 +20,7 @@
 			'name'    => __( 'Table', 'gd-rating-system' ),
 			'engine'  => __( 'Engine', 'gd-rating-system' ),
 			'records' => __( 'Records', 'gd-rating-system' ),
-			'size'    => __( 'Size', 'gd-rating-system' )
+			'size'    => __( 'Size', 'gd-rating-system' ),
 		);
 	}

--- a/gd-rating-system/core/grids/ratings.php
+++ b/gd-rating-system/core/grids/ratings.php
@@ -15,10 +15,10 @@
 		parent::__construct( array(
 			'singular' => 'rating',
 			'plural'   => 'ratings',
-			'ajax'     => false
+			'ajax'     => false,
 		) );

-		$this->_status = isset( $_GET['status'] ) && ! empty( $_GET['status'] ) ? d4p_sanitize_slug( $_GET['status'] ) : 'rated';
+		$this->_status = ! empty( $_GET['status'] ) ? d4p_sanitize_slug( $_GET['status'] ) : 'rated';
 	}

 	private function _log( $args ) {
@@ -60,7 +60,7 @@
 		return array(
 			'all'      => '<a href="' . add_query_arg( 'status', 'all', $url ) . '" class="' . ( $this->_status == 'all' ? 'current' : '' ) . '">' . __( 'All', 'gd-rating-system' ) . '</a>',
 			'rated'    => '<a href="' . add_query_arg( 'status', 'rated', $url ) . '" class="' . ( $this->_status == 'rated' ? 'current' : '' ) . '">' . __( 'Rated', 'gd-rating-system' ) . '</a>',
-			'notrated' => '<a href="' . add_query_arg( 'status', 'notrated', $url ) . '" class="' . ( $this->_status == 'notrated' ? 'current' : '' ) . '">' . __( 'Not Rated', 'gd-rating-system' ) . '</a>'
+			'notrated' => '<a href="' . add_query_arg( 'status', 'notrated', $url ) . '" class="' . ( $this->_status == 'notrated' ? 'current' : '' ) . '">' . __( 'Not Rated', 'gd-rating-system' ) . '</a>',
 		);
 	}

@@ -77,18 +77,18 @@
 				'dy-03' => __( 'Last 3 day', 'gd-rating-system' ),
 				'dy-05' => __( 'Last 5 day', 'gd-rating-system' ),
 				'dy-07' => __( 'Last 7 day', 'gd-rating-system' ),
-				'dy-30' => __( 'Last 30 days', 'gd-rating-system' )
+				'dy-30' => __( 'Last 30 days', 'gd-rating-system' ),
 			), $this->list_all_months_dropdown() );

 			$all_entities = array_merge( array(
 				array(
 					'title'  => __( 'Global', 'gd-rating-system' ),
-					'values' => array( '' => __( 'All Entities', 'gd-rating-system' ) )
-				)
+					'values' => array( '' => __( 'All Entities', 'gd-rating-system' ) ),
+				),
 			), gdrts_list_all_entities() );

-			$_sel_entity = isset( $_GET['filter-entity'] ) && ! empty( $_GET['filter-entity'] ) ? d4p_sanitize_basic( $_GET['filter-entity'] ) : '';
-			$_sel_period = isset( $_GET['filter-period'] ) && ! empty( $_GET['filter-period'] ) ? d4p_sanitize_slug( $_GET['filter-period'] ) : '';
+			$_sel_entity = ! empty( $_GET['filter-entity'] ) ? d4p_sanitize_basic( $_GET['filter-entity'] ) : '';
+			$_sel_period = ! empty( $_GET['filter-period'] ) ? d4p_sanitize_slug( $_GET['filter-period'] ) : '';

 			echo '<div class="alignleft actions">';
 			d4p_render_grouped_select( $all_entities, array( 'selected' => $_sel_entity, 'name' => 'filter-entity' ) );
@@ -139,7 +139,7 @@
 			'entity'  => __( 'Rating Type', 'gd-rating-system' ),
 			'id'      => __( 'ID', 'gd-rating-system' ),
 			'ratings' => __( 'Ratings', 'gd-rating-system' ),
-			'latest'  => __( 'Latest Vote', 'gd-rating-system' )
+			'latest'  => __( 'Latest Vote', 'gd-rating-system' ),
 		) );
 	}

@@ -149,7 +149,7 @@
 			'entity'  => array( 'entity', false ),
 			'name'    => array( 'name', false ),
 			'id'      => array( 'id', false ),
-			'latest'  => array( 'latest', false )
+			'latest'  => array( 'latest', false ),
 		);
 	}

@@ -167,12 +167,12 @@
 		return array(
 			'delete'             => __( 'Delete', 'gd-rating-system' ),
 			'clear'              => __( 'Clear', 'gd-rating-system' ),
-			'clear_stars-rating' => __( 'Clear Stars Ratings', 'gd-rating-system' )
+			'clear_stars-rating' => __( 'Clear Stars Ratings', 'gd-rating-system' ),
 		);
 	}

 	protected function column_default( $item, $column_name ) {
-		$value = isset( $item->$column_name ) ? $item->$column_name : '';
+		$value = $item->$column_name ?? '';

 		return apply_filters( 'gdrts_admin_grid_ratings_column_value', $value, $column_name, $item );
 	}
@@ -201,18 +201,14 @@

 	protected function column_entity( $item ) {
 		$actions = array(
-			'log' => '<a href="' . $this->_log( '&filter-entity=' . $item->entity . '.' . $item->name ) . '">' . __( 'Log', 'gd-rating-system' ) . '</a>'
+			'log' => '<a href="' . $this->_log( '&filter-entity=' . $item->entity . '.' . $item->name ) . '">' . __( 'Log', 'gd-rating-system' ) . '</a>',
 		);

 		$_entity = gdrts()->get_entity( $item->entity );

 		$label = $_entity['label'] . ' :: ';

-		if ( isset( $_entity['types'][ $item->name ] ) ) {
-			$label .= $_entity['types'][ $item->name ];
-		} else {
-			$label .= $item->name . ' <strong style="color: red">(' . __( 'missing', 'gd-rating-system' ) . ')</strong>';
-		}
+		$label .= $_entity['types'][ $item->name ] ?? $item->name . ' <strong style="color: red">(' . __( 'missing', 'gd-rating-system' ) . ')</strong>';

 		$render  = apply_filters( 'gdrts_ratings_grid_content_column_entity', $label, $item );
 		$actions = apply_filters( 'gdrts_ratings_grid_actions_column_entity', $actions, $item );
@@ -222,7 +218,7 @@

 	protected function column_id( $item ) {
 		$actions = array(
-			'log' => '<a href="' . $this->_log( 'filter-item_id=' . $item->item_id ) . '">' . __( 'Log', 'gd-rating-system' ) . '</a>'
+			'log' => '<a href="' . $this->_log( 'filter-item_id=' . $item->item_id ) . '">' . __( 'Log', 'gd-rating-system' ) . '</a>',
 		);

 		$title = __( 'Item not found', 'gd-rating-system' );
@@ -267,8 +263,8 @@

 		$status = $this->_status;

-		$entity = isset( $_GET['filter-entity'] ) && ! empty( $_GET['filter-entity'] ) ? d4p_sanitize_basic( $_GET['filter-entity'] ) : '';
-		$last   = isset( $_GET['filter-period'] ) && ! empty( $_GET['filter-period'] ) ? d4p_sanitize_slug( $_GET['filter-period'] ) : 0;
+		$entity = ! empty( $_GET['filter-entity'] ) ? d4p_sanitize_basic( $_GET['filter-entity'] ) : '';
+		$last   = ! empty( $_GET['filter-period'] ) ? d4p_sanitize_slug( $_GET['filter-period'] ) : 0;

 		if ( $status != '' && $status != 'all' ) {
 			$join .= " LEFT JOIN (SELECT DISTINCT item_id FROM " . gdrts_db()->items_basic . ") m ON m.item_id = i.item_id";
@@ -330,7 +326,7 @@
 			'orderby'  => $orderby,
 			'order'    => $order,
 			'offset'   => $offset,
-			'per_page' => $per_page
+			'per_page' => $per_page,
 		) );

 		if ( ! empty( $SQL['where'] ) ) {
--- a/gd-rating-system/core/grids/types.php
+++ b/gd-rating-system/core/grids/types.php
@@ -13,7 +13,7 @@
 		parent::__construct( array(
 			'singular' => 'type',
 			'plural'   => 'types',
-			'ajax'     => false
+			'ajax'     => false,
 		) );

 		$this->custom_types = gdrts_settings()->get( 'custom_entities', 'early' );
@@ -39,7 +39,7 @@
 		return array(
 			'icon'   => '',
 			'entity' => __( 'Entity', 'gd-rating-system' ),
-			'types'  => __( 'Types', 'gd-rating-system' )
+			'types'  => __( 'Types', 'gd-rating-system' ),
 		);
 	}

@@ -71,8 +71,6 @@
 			$types[] = '<li>' . $label . ' · <strong>' . $name . '</strong></li>';
 		}

-		$render = '';
-
 		if ( empty( $types ) ) {
 			$render = __( 'No types registered.', 'gd-rating-system' );
 		} else {
--- a/gd-rating-system/core/grids/votes.php
+++ b/gd-rating-system/core/grids/votes.php
@@ -18,12 +18,12 @@
 	function __construct( $args = array() ) {
 		$this->_remove_log = gdrts_settings()->get( 'admin_log_remove' );

-		$this->_status = isset( $_GET['status'] ) && ! empty( $_GET['status'] ) ? d4p_sanitize_slug( $_GET['status'] ) : '';
+		$this->_status = ! empty( $_GET['status'] ) ? d4p_sanitize_slug( $_GET['status'] ) : '';

 		parent::__construct( array(
 			'singular' => 'vote',
 			'plural'   => 'votes',
-			'ajax'     => false
+			'ajax'     => false,
 		) );
 	}

@@ -60,7 +60,7 @@
 		return array(
 			'all'      => '<a href="' . $url . '" class="' . ( $this->_status == '' ? 'current'

Frequently Asked Questions

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School