Multisite: Make uninstall preference network-wide
-
Hi,
Thanks for this great easy to use plugin.
The following is a performance/architecture suggestion for multisite installations, not a security issue.I noticed that
uninstall.phpusesget_sites()withnumber => 0and then callsswitch_to_blog()for every site.On very large multisite networks (e.g. tens of thousands of subsites), this could make the uninstall process unnecessarily expensive. In particular, when the setting is “Keep data”, the code still iterates through all sites even though
aicft_uninstall_site()immediately returns.I would suggest making the uninstall preference network-wide on multisite, available only to the Super Admin and not to administrators of individual subsites, and storing it via
get_site_option()/update_site_option().With this approach:
- Keep data → the uninstall process can return immediately without iterating through the subsites.
- Remove data → the plugin processes the sites and removes its data.
This would avoid unnecessary processing on large multisite networks while also making the uninstall preference consistent at network level.
Thanks!
Lena
You must be logged in to reply to this topic.