Data Storage & Uninstall
Data Storage
OCodeInsert uses WordPress wp_options -- no custom database tables.
| Option Key | Contents |
|---|---|
oci_code_snippets | JSON-encoded array of all snippets |
oci_settings | Plugin settings (enabled, safe_mode, allowed_roles) |
oci_error_log | Array of error log entries (max 50) |
Snippet schema:
json{
"id": "uuid-v4",
"title": "string",
"type": "html | js | css",
"code": "string (raw code)",
"location": "head | before_content | after_content | footer",
"active": true,
"priority": 10,
"pages": "comma-separated URL patterns or empty string",
"page_types": ["all"],
"user_condition": "all | logged_in | logged_out",
"created": "Y-m-d H:i:s"
}
Performance note: All snippets load from a single get_option() call per page load. Optimal for up to ~50 snippets. OCodeInsert Pro automatically migrates to a dedicated database table above 50 snippets.
Uninstall
When deleted via Plugins -> Delete (not just deactivated), uninstall.php removes:
oci_code_snippetsoci_settingsoci_error_log
Important: Deactivating does NOT delete any data. Only deleting the plugin triggers cleanup.
