Super Admin Performance Boost.
Super Admin Performance Boost.
by Per Soderlind · github.com/soderlind/super-admin-performance-boost · website
★ 9stars
963composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/soderlind/super-admin-performance-boost/archive/refs/heads/main.zipAlso on Packagist as soderlind/super-admin-performance-boost:
composer require soderlind/super-admin-performance-boostDeclares an update source (https://github.com/soderlind/super-admin-performance), so updates arrive through the plugin's own updater.
From the readme
Super Admin Performance Boost
On a WordPress Multisite, tries to avoid using switchtoblog() and restorecurrentblog() when possible.
Description
1. Short-circuit the getblogsofuser() function. We don't have to check if a site is own by the user, we want all sites.
2. Extend WPMSSitesListTable and use bespoke SuperAdminPerformanceBoost::getadminurl() and SuperAdminPerformanceBoost::gethomeurl() funtions.
3. Extend WPMSUsersListTable
- For the Super Admin, hide their sites in the Sites column.
- For rest of the users, use bespoke SuperAdminPerformanceBoost::gethomeurl() funtions.
Side note
I wish I did't have to write this and the Super Admin All Sites Menu plugin, but it feels like WordPress Multisite is not ready for the Super Admin role.
I have a multisite with 100+ sites, and the following issues are a pain:
- The My Sites menu doesn't work for more than 23 sites, hence my Super Admin All Sites Menu plugin.
- switchtoblog() is used on every site for each page load, only to get the blog details, which is a waste of resources.
- There's no point in listing all sites in the Sites column for the Super Admin, they own them all.
Installation
You know the drill.
Copyright
Read the full README on GitHub →