You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Core Support for Post Meta & Content Size Analysis #2462
🚀 Feature Description: Core Support for Post Meta & Content Size Analysis
Summary
Introduce a standardized mechanism in WordPress core (or Performance plugin) to analyze and monitor post meta and content size across post types, including custom post types (CPTs).
Background
Plugins like CPT Meta Size Analyzer highlight the need for visibility into how much data is stored in postmeta and post_content. Large or unoptimized metadata can negatively impact database performance, query efficiency, and scalability.
Currently, WordPress does not provide built-in tools to:
Measure meta size per post or post type
Monitor content size distribution
Identify unusually large entries
Problem
The lack of native tooling creates several challenges:
No built-in way to audit wp_postmeta growth
Difficult to detect performance bottlenecks caused by large meta values
Limited visibility into content storage footprint
No standardized API for size calculations
Proposed Solution
Introduce a core-supported feature (or Performance plugin module) with the following capabilities:
1. Post Meta Size Metrics
Calculate total meta size per post
Aggregate meta size per post type
Display size in configurable units (Bytes, KB, MB)
2. Content Size Metrics
Compute total and per-post post_content size
Provide summaries per post type
3. Admin UI Enhancements
Add optional columns in post list tables:
Meta Size
Content Size
Provide an overview dashboard (Tools page or Site Health integration)
WordPress and WooCommerce environments, I’ve seen firsthand how unmonitored wp_postmeta growth becomes a silent killer for query performance and database scalability.
To make this implementation robust for Core, I suggest focusing on these technical considerations:
Asynchronous Processing: To avoid the 'observer effect'—where the measurement tool itself slows down the site—calculations should be handled via background processing or scheduled tasks rather than on-the-fly during admin page loads.
Measurement Accuracy: We should use OCTET_LENGTH rather than CHAR_LENGTH to ensure we are capturing the actual byte size on the disk, especially for sites using multi-byte character sets or storing large serialized arrays.
Site Health Integration: Beyond just a list table column, this would be highly effective as a Site Health check that triggers a warning if specific post types or meta keys exceed a defined threshold (e.g., >500KB per post).
Scalable API: A standardized wp_get_post_storage_info( $post_id ) function would allow developers to easily retrieve these metrics for custom dashboards or CLI-based maintenance scripts.
Activity
gohelkunjan commentedon May 12, 2026
Hi @praful2111
WordPress and WooCommerce environments, I’ve seen firsthand how unmonitored wp_postmeta growth becomes a silent killer for query performance and database scalability.
To make this implementation robust for Core, I suggest focusing on these technical considerations:
Asynchronous Processing: To avoid the 'observer effect'—where the measurement tool itself slows down the site—calculations should be handled via background processing or scheduled tasks rather than on-the-fly during admin page loads.
Measurement Accuracy: We should use OCTET_LENGTH rather than CHAR_LENGTH to ensure we are capturing the actual byte size on the disk, especially for sites using multi-byte character sets or storing large serialized arrays.
Site Health Integration: Beyond just a list table column, this would be highly effective as a Site Health check that triggers a warning if specific post types or meta keys exceed a defined threshold (e.g., >500KB per post).
Scalable API: A standardized wp_get_post_storage_info( $post_id ) function would allow developers to easily retrieve these metrics for custom dashboards or CLI-based maintenance scripts.