Admin Speed (Turbo V2)
📁 Dosya adı:
admin-speed.php

<?php
/*
Plugin Name: Admin Speed
Description: WordPress admin panel ve post editor hız optimizasyonu (SQL + Cache + AJAX)
Version: 2.0
Author: Admin Speed System
*/

if (!defined('ABSPATH')) exit;

/**
* SADECE EDITOR SAYFALARINDA ÇALIŞ
*/
function as_is_editor() {
global $pagenow;
return in_array($pagenow, ['post-new.php', 'post.php']);
}

/**
* 1. SQL / QUERY OPTIMIZATION
*/
add_action('pre_get_posts', function ($query) {

if (!is_admin() || !$query->is_main_query()) return;
if (!as_is_editor()) return;

$query->set('update_post_meta_cache', false);
$query->set('update_post_term_cache', false);

}, 1);


/**
* 2. ADMIN SCRIPT CLEANER
*/
add_action('admin_enqueue_scripts', function () {

if (!as_is_editor()) return;

// Emoji kaldır
remove_action('admin_print_scripts', 'print_emoji_detection_script');
remove_action('admin_print_styles', 'print_emoji_styles');

// Gereksiz scriptler
wp_dequeue_script('autosave');
wp_dequeue_script('wp-auth-check');

}, 999);


/**
* 3. HEARTBEAT OPTIMIZATION (AJAX azaltma)
*/
add_filter('heartbeat_settings', function ($settings) {

if (!as_is_editor()) return $settings;

$settings['interval'] = 90; // 15s → 90s
return $settings;
});


/**
* 4. META BOX LIGHT MODE
*/
add_action('add_meta_boxes', function () {

if (!as_is_editor()) return;

remove_meta_box('slugdiv', 'post', 'normal');
remove_meta_box('trackbacksdiv', 'post', 'normal');
remove_meta_box('postcustom', 'post', 'normal');
remove_meta_box('commentsdiv', 'post', 'normal');

}, 99);


/**
* 5. AJAX THROTTLE
*/
add_filter('heartbeat_received', function ($response, $data) {

if (!as_is_editor()) return $response;

if (isset($data['wp_autosave'])) {
unset($response['wp_autosave']);
}

return $response;

}, 10, 2);


/**
* 6. CACHE FLAG (transient boost)
*/
add_action('admin_init', function () {

if (!as_is_editor()) return;

if (!get_transient('as_editor_cache')) {
set_transient('as_editor_cache', 1, 600);
}

});


/**
* 7. CLEANUP CACHE ON OPEN
*/
add_action('load-post.php', function () {
delete_transient('as_editor_cache');
});

add_action('load-post-new.php', function () {
delete_transient('as_editor_cache');
});
  • Dosyayı oluştur:
    wp-content/plugins/admin-speed/admin-speed.php
  • WordPress panel → Eklentiler → Admin Speed aktif et
Admin hızlandırma için ücretsiz bir eklenti

Wordpress haber sayfaları için süper eklenti.
Deneyip yorum yapın