> Wordpress Registry wordpress plugin resources analysis

Wordpress Registry wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name Wordpress Registry
Version 2.4
Author Rubin Shrestha
Rating 0
Last updated 2012-09-12 12:27:00
Downloads
826
Download Plugins Speed Test plugin for Wordpress

Home page

Delta: 0%

Post page

Delta: 0%
Wordpress Registry 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%

Wordpress Registry plugin added 175 bytes of resources to the Home page and 176 bytes of resources to the sample Post page.

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

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

The main reason for building this plugin is because wordpress doesn't readily have a central registry system where things can be stored such as variable values, objects, arrays. Which can be retrieved from a global space. This plugin basically tries to lessen the repeating declarations of variables and etc. It is something quite similar to Magento registry "Mage_Registry", but very light version.

This plugin can also be used as GET and POST request parameters handler. The benefit is, you don't have to check isset($_GET['myparam']) or isset($_POST['myparam']). If the param is not set, it will return a default value you supplied in second param. By default, the default value is false.

Handle the session data as easy as never before. Save to session, check existance, get, unset it easily using dynamic methods.

Hope this could be of some use.

Usage is very easy, neat and straight forward:

Register a dynamic method on the fly: registry()->setDynamicMethodName('this is my value'); registry()->setMyName('My Name is Rubin Shrestha');

Validate existance of your method and echo: if( registry()->hasDynamicMethodName() ) echo 'Has ' . registry()->getDynamicMethodName();

Unset the dynamic method: registry()->unsDynamicMethodName(); after this, if you echo registry()->getDynamicMethodName() it will return null;

For GET and POST request handler use it like this:

  • For $_GET, you can simply call registry()->request()->getParam('param_key', [default value if any, else blank, will return false]);
  • To check if the page type is $_POST use if( registry()->request()->isPost() ) { //do your stuffs here }
  • For $_POST, you can simply call registry()->request()->getPost('param_key', [default value if any, else blank; will return false]);
  • You can also do registry()->request()->getParams() and registry()->request()->getPosts();
  • You can also add request object scope variable, registry()->request()->setVariableName('this is my value');. Get the value by registry()->request()->getVariableName();

Session handler:

Handle the data in session as easy as registry()->session()->setDynamicMethodName('this is my value'); and get it as registry()->session()->getDynamicMethodName(); Unset it registry()->session()->unsDynamicMethodName();

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
SqueezeMe screenshot

SqueezeMe

by: tradesouthwest@gmail.com

3516
0%
Shocking screenshot

Shocking

by: jbbrwcky

15568
0%