> WP-Waitlist wordpress plugin resources analysis

WP-Waitlist wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name WP-Waitlist
Version 0.1
Author maymay
Rating 80
Last updated 2014-05-05 09:53:00
Downloads
320
Download Plugins Speed Test plugin for Wordpress
90Score

Home page

Delta: 0%
89Score

Post page

Delta: 0%
WP-Waitlist 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%

WP-Waitlist plugin added 14 bytes of resources to the Home page and 50 bytes of resources to the sample Post page.

WP-Waitlist plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.

Great! WP-Waitlist plugin ads no tables to your Wordpress blog database.

Add one or more "lists" to any post. Registered users of your site can then join or leave the list. Lists can be used for any purpose (event RSVPs, running polls or surveys, etc.) and can be unobtrusively added to any post type. Optionally, lists can have a maximum number of users on it that you define, after which any user who joins the list is automatically added to an overflow "waitlist."

This plugin also serves the needs of plugin developers who are looking for a simple way to manage sets of users on a per-post basis. A simple set of public functions are exposed to other installed plugins that developers can use to get information about the lists themselves, and the users listed on them.

Code examples

After installing and activating this plugin, include it in your own plugin project as follows:

<?php
/**
 * Plugin Name: My plugin project
 * Plugin URI: http://example.com/
 * Description: Example plugin for playing with WP-Waitlist.
 * Author: Me, myself, and I
 * Version: 1.0
 */

class My_Plugin {
    private $WP_Waitlist;

    public function __construct () {
        add_action('init', array($this, 'registerDepdencies'));
    }

    public function registerDepdencies () {
        global $WP_Waitlist;
        if (!$WP_Waitlist) {
            // WP-Waitlist is not available, issue an error.
        } else {
            $this->$WP_Waitlist = $WP_Waitlist;
        }
    }

}

$My_Plugin = new My_Plugin();

At that point, you can call WP-Waitlist's functions in your own plugin as follows:

public function myPluginLearnsAboutWaitlists ($post_id) {
    // Get an array of all lists that the author of this post created.
    $lists = $this->WP_Waitlist->getListsForPost($post_id);

    // You can iterate through the lists attached to this post.
    foreach ($lists as $list_name) {
        $list_properties = $this->WP_Waitlist->getListProperties($post_id, $list_name);
        foreach ($list_properties as $property_name => $property_value) {
            print "$property_name is $property_value <br />";
        }

        // You can also learn which users are on the list...
        $user_ids = $this->WP_Waitlist->getListedUsers($post_id, $list_name);
        foreach ($user_ids as $id) {
            $this_wp_user = get_userdata($id); // $this_wp_user is now a WP_User object.
        }

        // ...and which users have been waitlisted (joined after the list reached capacity).
        $waitlisted_users = $this->WP_Waitlist->getWaitlistedUsers($post_id, $list_name);

        // You can also get an array all users who have added themselves to the list, sorted by date.
        $all_user_ids_on_list = $this->WP_Waitlist->getUsersOnList($post_id, $list_name);
    }

}

Plugins that use this one

Know of a plugin that's using WP-Waitlist? Let us know by posting in the support forum. :)

Resources added by plugin to Home page/Post page in kB
Created with Raphaël 2.1.00 kB0.25 kB0.5 kB0.75 kB1 kBOtherJavaScriptImagesCSSHTML
Other
Home Page: 0 kB
Post Page: 0 kB
Total size of resources for Home page/Post page in kB
Created with Raphaël 2.1.00 kB125 kB250 kB375 kB500 kBOtherJavaScriptImagesCSSHTML
Other
Home Page: 365 kB
Post Page: 440 kB
Random Theme Tests
eSell screenshot

eSell

by: sandy786

31602
96%
Circa screenshot

Circa

by: automattic

8214
20%