> All Inclusive wordpress plugin resources analysis

All Inclusive wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name All Inclusive
Version 1.0.6
Author stur Stepanov Yuri
Rating 0
Last updated 2013-02-02 10:12:00
Downloads
1204
Download Plugins Speed Test plugin for Wordpress

Home page

Delta: 0%

Post page

Delta: 0%
All Inclusive plugin has no negative impact on PageSpeed score.

Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%

All Inclusive plugin added 15 bytes of resources to the Home page and 19 bytes of resources to the sample Post page.

All Inclusive plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.

Great! All Inclusive plugin ads no tables to your Wordpress blog database.

The pluginplug-in, with two additional SQL queries, joins the original data sample $wp_query->posts all meta fields, all files and images, for each image the direct url to small, medium, and large image is formed. There’s no need to use functions the_post_thumbnail and get_post_meta.

How it works

So let’s say we go to the home page of our blog, WordPress gives us a list of the latest 10 records. Let me remind you these are already in the global object in the array $wp_query-> posts. Let’s begin from creating a list of ID (number of records to which they are stored in the database).

Form the first SQL query:

  • $query = "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_parent IN('21','29','30','35','38','42','46','48','49','55') AND $wpdb->posts.post_parent AND $wpdb->posts.post_type = 'attachment'";

A normal translation is «find all the child entries for entries with the numbers (’21 ‘, ’29?, ’30 ‘, ’35?, ’38 ‘, ’42?, ’46 ‘, ’48?, ’49 ‘, ’55 ‘)». And the type of records required to be «attachment». That is, in short, we find all the files (attachment) which we downloaded for our 10 entries.

Again we form a list of ID: the first 10 ID entries and add the ID of files (attachments). Attachments as ordinary records are stored in one table – wp_posts.

Now we use the function update_meta_cache:

  • $all_meta = update_meta_cache('post', $ar_all_id);

$ar_all_id – here are the original recordings and attachments

So everything just gets in the cache and subsequent calls get_post_meta will derive value from the cache. The rest is a matter of technique – the data must be carefully arranged, not mixing anything up. All meta fields are added to the $post->meta array, and files into an $post->files array and files are immediately sorted by number order (when downloading it, you can specify the sort order). In addition, for each file, if it is an image, the full path to the thumbnails is calculated: small (thumbnail), average (medium) and the complete picture (full).

Home page Details

Resources added by plugin to Home page/Post page in kB
Total size of resources for Home page/Post page in kB
Random Theme Tests
Ugallu screenshot

Ugallu

by: trsenna

4619
0%
Written screenshot

Written

by: obert

3457
0%