How much does $wpdb->prepare(), then $wpdb->query() VS straight $wpdb->query(), can slow down the load time of whole page
$wpdb->prepare shouldn’t make any significant difference. As you can see here (https://developer.wordpress.org/reference/classes/wpdb/prepare/#source), it doesn’t do much. It’s just taking care of proper escaping and formatting variables, so the final query is safe to run. So if you’re asking if there is a big difference between $wpdb->query( $wpdb->prepare( … ) ) and $wpdb->query( <SAFE_SQL> ), then … Read more