开发者 |
hiteshtalpada
praful2111 krishaweb |
---|---|
更新时间 | 2025年6月28日 12:46 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 6.7 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/cpt-meta-size-analyzer
directory, or install the plugin through the WordPress plugins screen directly.= 1. How is the post meta and content size calculated? =\ The plugin calculates the total size of post meta and content data by fetching all entries for a post type and summing their byte sizes. It then converts the size into KB (Kilobytes) and MB (Megabytes) for better readability. = 2. Why does my post size show as 0 KB? =\ If the total size is too small (less than 1 KB), rounding may result in a 0 KB display. The plugin provides precise calculations in bytes, KB, and MB, so even small values are accounted for. = 3. What does the conversion formula look like? =\ The conversion formula used in the plugin is:
Total Bytes ÷ 1024
Total Bytes ÷ (1024 × 1024)
When you clear the cache, the plugin recalculates the post meta and content sizes, ensuring that any recent changes in the database are reflected.Yes! The plugin allows filtering post statuses using the cptmesia_content_size_post_statuses filter: add_filter( 'cptmesia_content_size_post_statuses', function( $statuses ) { $statuses[] = 'private'; // Include private posts. return $statuses; });
No, the plugin fetches data efficiently and uses caching to reduce database queries. However, if you have a large number of posts, calculations may take slightly longer.
= 9. Can I clear cached data? =\
Yes, you can click on the "Clear Cache" button to refresh and recalculate all meta and content sizes.
= 10. What post types are supported? =\
By default, it supports Posts, Pages, and Products (WooCommerce), but you can enable other custom post types from the plugin settings.
= 11. Can I include private or custom post statuses in calculations? =\
Yes, by default, only 'publish' and 'draft' posts are included. You can modify this using the cptmesia_content_size_post_statuses
filter. See Filters section below for an example.