# imagify/1.5/uninstall.php

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version 1.5. 25 lines.

- Page: https://pluginprobe.com/plugins/imagify/1.5/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/imagify/1.5/raw/uninstall.php
- Modified: 2016-04-25T17:40:50+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/imagify/1.5/code/uninstall.php#L10-L20`.

```php
<?php
// If uninstall not called from WordPress exit
defined( 'WP_UNINSTALL_PLUGIN' ) or die( 'Cheatin&#8217; uh?' );

// Delete Imagify options
delete_site_option( 'imagify_settings' );

// Delete all transients
delete_site_transient( 'imagify_check_licence_1' );
delete_site_transient( 'imagify_bulk_optimization_level' );
delete_site_transient( 'imagify_large_library' );

global $wpdb;
// WP transients
$wpdb->query( 'DELETE from ' . $wpdb->options . ' WHERE option_name LIKE "_transient_imagify-async-in-progress-%"' );

// NextGen Gallery transients
$wpdb->query( 'DELETE from ' . $wpdb->options . ' WHERE option_name LIKE "_transient_imagify-ngg-async-in-progress-%"' );

// Delete all user meta related to Imagify
delete_metadata( 'user', '', '_imagify_ignore_notices', '', true );

// Drop the tables
$wpdb->query( "DROP TABLE IF EXISTS $wpdb->ngg_imagify_data" );

```
