WP Manifestindependent plugin directory
manifest / performance / rss-last-modified-optimizer

RSS Last-Modified Optimizer

WordPress plugin that speeds up RSS feeds by avoiding expensive last-modified scans on large post tables.

by Daniel Dočekal · github.com/danieldocekal/rss-last-modified-optimizer · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/danieldocekal/rss-last-modified-optimizer/archive/refs/heads/main.zip

Readme

RSS Last-Modified Optimizer

RSS Last-Modified Optimizer is a small WordPress plugin that speeds up RSS feeds on large sites by avoiding an expensive WordPress last-modified lookup.

Why This Exists

When WordPress generates feeds, it may call:

get_lastpostmodified( 'gmt', 'any' )

On sites with many posts, that lookup can become surprisingly expensive. Without a suitable database index, WordPress may need to scan and sort a large wp_posts table just to decide the Last-Modified value for an RSS response.

That is usually wasted work. Feed freshness only needs a stable timestamp that changes when published content changes.

This plugin short-circuits that feed-only lookup through WordPress' pre_get_lastpostmodified filter and returns a timestamp stored in wp_options. The timestamp is refreshed when posts are saved, deleted, or change status.

What It Does

  • Optimizes RSS/feed requests only.
  • Leaves normal frontend, admin, REST, and cron requests alone.
  • Only short-circuits calls for post type any, matching WordPress' expensive feed freshness path.
  • Stores the timestamp in a non-autoloaded option: rss_last_modified_optimizer_gmt.
  • Has no settings screen and does not log anything.

Observed Impact

On a staging copy of FeedIT.cz with almost 100,000 posts, sampled RSS feed requests dropped from roughly 2.5-3.0 seconds to about 0.35-0.7 seconds after enabling this optimization.

The exact improvement depends on the hosting environment, database size, indexes, caching, and feed traffic, but this shows the kind of issue the plugin is meant to address.

Requirements

  • WordPress 5.9 or newer
  • PHP 7.4 or newer

Installation

Copy the plugin directory to:

wp-content/plugins/rss-last-modified-optimizer

Then activate RSS Last-Modified Optimizer in WordPress admin.

Development Checks

Run the PHP syntax check before releasing or deploying:

php -l rss-last-modified-optimizer.php

Development Note

This plugin was built as a collaboration between Daniel Dočekal and OpenAI Codex. The problem definition, staging measurements, production validation, and release decisions came from real WordPress sites; Codex assisted with the implementation, documentation, repository preparation, and publishing workflow.

License

GPL-2.0-or-later.

Read the full README on GitHub →

Releases

TagPublished
v1.0.0 Aug 4, 2026

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.