• Resolved lenasterg

    (@lenasterg)


    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.php uses get_sites() with number => 0 and then calls switch_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

Viewing 1 replies (of 1 total)
  • Plugin Author grafiduo

    (@grafiduo)

    Hi,

    Thank you for your kind words about the plugin, and for taking the time to share such a detailed suggestion. I really appreciate valuable feedback like this.

    You’re right that looping through every site with get_sites() and switch_to_blog() during uninstall isn’t ideal, especially on larger multisite networks. I’ve taken your notes into account, and an update with the appropriate change will be included in the next release, version 1.6.6.

    Thanks again for your help in making the plugin better!

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.