# simpleanalytics/1.110/uninstall.php

Simple Analytics, version 1.110. 30 lines.

- Page: https://pluginprobe.com/plugins/simpleanalytics/1.110/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/simpleanalytics/1.110/raw/uninstall.php
- Modified: 2026-09-16T13:31:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/simpleanalytics/1.110/code/uninstall.php#L10-L20`.

```php
<?php

defined('WP_UNINSTALL_PLUGIN') || exit;

require_once __DIR__ . '/src/SettingName.php';

$deleteOptions = static function (): void {
    foreach (SimpleAnalytics\SettingName::cases() as $key) {
        delete_option($key);
    }
};

if (is_multisite()) {
    $offset = 0;
    do {
        $siteIds = get_sites(['fields' => 'ids', 'number' => 100, 'offset' => $offset, 'orderby' => 'id', 'order' => 'ASC']);
        foreach ($siteIds as $siteId) {
            switch_to_blog($siteId);
            try {
                $deleteOptions();
            } finally {
                restore_current_blog();
            }
        }
        $offset += count($siteIds);
    } while (count($siteIds) === 100);
} else {
    $deleteOptions();
}

```
