I am writing a wordpress plugin
The problem is this plugin effecting website performance.
I need tips to make my plugin faster, any help would be amazing.
My plugin contains several classes and I am including all of them in the main php file also using mostly "init" for my actions.
$inc_path = ABSPATH . 'wp-content/plugins/doctor-profile/'; require_once $inc_path . 'includes/helpers.php'; include_once $inc_path . 'plugin-template.php'; include_once $inc_path . 'includes/installer.php'; include_once $inc_path . 'includes/shortcodes.php'; include_once $inc_path . 'includes/options.php'; include_once $inc_path . 'includes/registration.php'; include_once $inc_path . "includes/login.php"; include_once $inc_path . 'includes/upload.php'; include_once $inc_path . "includes/editprofile.php"; $helper = new SalamatiInstaller(); $editProfile = new SalamatiEditProfile(); $shortCodes = new SalamatiShortCodes(); $options = new SalamatiOptions(); $login = new SalamatiLogin(); $registration = new SalamatiRegistration(); //
When the plugin is enabled the website load time is 9 second and when the plugin is deactivated the website load time is 5 second.
this is how I am including my classes.
Any Tips Anything regardless of my code would be amazing thanks.