# Pending Updates Summary Widget

> Adds a dashboard widget showing how many WordPress, plugin, theme and translation updates are waiting, with the names of the plugins and a link to install them.

- Type: PHP
- Runs: Admin only
- Category: [Dashboard](https://wpide.com/library/category/dashboard/)
- Tags: dashboard-widget, updates, maintenance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/dash-pending-updates-widget/

## Code

```php
add_action( 'wp_dashboard_setup', function () {
    if ( ! current_user_can( 'update_plugins' ) ) {
        return;
    }

    wp_add_dashboard_widget( 'wpide_pending_updates', 'Pending updates', function () {
        $plugins      = get_site_transient( 'update_plugins' );
        $themes       = get_site_transient( 'update_themes' );
        $core         = get_site_transient( 'update_core' );
        $plugin_list  = ! empty( $plugins->response ) ? $plugins->response : array();
        $theme_count  = ! empty( $themes->response ) ? count( $themes->response ) : 0;
        $core_update  = ! empty( $core->updates[0] ) && 'upgrade' === $core->updates[0]->response;
        $translations = count( wp_get_translation_updates() );

        if ( ! $plugin_list && ! $theme_count && ! $core_update && ! $translations ) {
            echo '<p><span class="dashicons dashicons-yes-alt" style="color:#00a32a" aria-hidden="true"></span> Everything is up to date.</p>';
            return;
        }

        echo '<ul>';
        if ( $core_update ) {
            printf( '<li><strong>WordPress %s</strong> is available.</li>', esc_html( $core->updates[0]->version ) );
        }
        if ( $plugin_list ) {
            if ( ! function_exists( 'get_plugins' ) ) {
                require_once ABSPATH . 'wp-admin/includes/plugin.php';
            }
            $all   = get_plugins();
            $names = array();
            foreach ( $plugin_list as $file => $update ) {
                $names[] = ( $all[ $file ]['Name'] ?? $file ) . ' ' . $update->new_version;
            }
            printf( '<li><strong>%d plugin updates:</strong> %s</li>', count( $plugin_list ), esc_html( implode( ', ', $names ) ) );
        }
        if ( $theme_count ) {
            printf( '<li><strong>%d theme updates</strong></li>', (int) $theme_count );
        }
        if ( $translations ) {
            printf( '<li><strong>%d translation updates</strong></li>', (int) $translations );
        }
        echo '</ul>';
        printf( '<p><a class="button button-primary" href="%s">Go to updates</a></p>', esc_url( admin_url( 'update-core.php' ) ) );
    } );
} );
```

## Notes

Uses the update data WordPress already checks twice a day, so it adds no remote requests.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Pending Updates Summary Widget" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
