Chapter 1: Introducing WordPress Plugins

In This Chapter

arrow.png Extending WordPress with plugins

arrow.png Comparing plugins to themes

arrow.png Finding plugins

arrow.png Evaluating the trustworthiness of plugins

One of the most important features of WordPress is its support for plugins. With plugins, you can add new features, remove existing features, or change how specific features function. In other words, plugins allow you to tailor WordPress to meet your site’s needs.

Plugins can be very simple — for instance, a plugin might change the appearance of the Dashboard menu. Or they can also be very complex, accomplishing hefty tasks such as providing a complete e-commerce solution with product listings, a shopping cart, and payment processing.

To help you make use of plugins to customize your site, this chapter explores what plugins are and shows you how to find and use plugins.

Extending WordPress with Plugins

WordPress by itself is an amazing tool. The features built into WordPress are meant to be the ones that you’ll benefit from the most. All the desired site features that fall outside what is built in to WordPress are considered the territory of plugins.

There's a popular saying among WordPress users: "There's a plugin for that." The idea is that if you want WordPress to do something new, you have a good chance of finding an existing plugin that can help you do what you want. Currently, more than 22,000 plugins are available in the WordPress Plugin Directory (http://wordpress.org/extend/plugins), and this number is constantly growing at a rate of a few new plugins each day. In addition, thousands of additional plugins that are outside the Plugin Directory are available for free or for a fee. So, if you have an idea for a new feature for your site, you just may find a plugin for that feature.

Suppose you want to easily add recipes to your site. A Google search for wordpress plugin recipes results in links to the Easy Recipe plugin (http://wordpress.org/extend/plugins/easyrecipe), the ZipList Recipe Plugin (http://wordpress.org/extend/plugins/ziplist-recipe-plugin), and the ReciPress plugin (http://recipress.com). And you can find more recipe-related plugins with a more in-depth search.

Identifying Core Plugins

Some plugins hold a very special place in WordPress in that they are shipped with the WordPress software and are included by default in every WordPress installation.

For the past few years, two plugins have held this special position:

check Akismet: The Akismet plugin has the sole purpose of protecting your blog from comment spam. Although other plugins address the issue of comment spam, the fact that Akismet is packaged with WordPress and works quite well means that most WordPress users rely on Akismet for their needs. Book III, Chapter 4 covers how to activate and configure Akismet on your site.

check Hello Dolly: The Hello Dolly plugin helps you get your feet wet in plugin development, if you’re interested. It was first released with WordPress 1.2 and is considered to be the oldest WordPress plugin. When the plugin is active, the tops of your Dashboard pages show a random lyric from the song “Hello, Dolly!”

Figure 1-1 shows the core plugins as found in WordPress version 3.5.

9781118383339-fg070101.tif

Figure 1-1: Core plugins in WordPress version 3.5.

remember.eps The idea of core plugins is to offer a base set of plugins to introduce you to the concept of plugins while also providing a benefit. The Akismet plugin is useful because comment spam is a big issue for blogs. The Hello Dolly plugin is useful as a nice starting point for understanding what plugins are and how they’re coded.

Although WordPress automatically includes these plugins, your site doesn’t have to run them. They are disabled by default and must be manually activated to be used. Core plugins can be deleted just as any other plugin can, and they won’t be replaced when you upgrade WordPress. (If you need to install or delete a plugin, turn to the next chapter.)

Although Akismet and Hello Dolly are the current core plugins and have been for several years, they aren’t the only plugins to have this position. WordPress 1.2 included five core plugins: Hello Dolly, MarkDown, Search Highlight, Textile 1, and Textile 2.

Future versions of WordPress may offer different sets of core plugins. It is possible that one or both of the current core plugins will cease being core plugins and that other plugins will be included. Although this topic has seen much discussion in WordPress development circles over the past few years, as of this writing, no definitive decisions have been made. So, the current set of core plugins is likely to stay for a while longer.

Distinguishing Between Plugins and Themes

Because themes can contain large amounts of code and add new features or other modifications to WordPress, you may wonder how plugins are different than themes. In reality, there are only a few technical differences between plugins and themes; however, the idea of what plugins and themes are supposed to be is quite different. (For more about themes, see Book VI.)

At the most basic level, the difference between plugins and themes is that they reside in different directories. Plugins can be found in the wp-content/plugins directory of your WordPress site. Themes can be found in the wp-content/themes directory.

technicalstuff.eps The wp-content/plugins and wp-content/themes directories are set up this way by default. It is possible to change both of these locations; however, this is very rarely done. It is something to be aware of if you're working on a WordPress site and are having a hard time locating a specific plugin or theme directory.

The most important difference that separates plugins from themes is that a WordPress site always has one and only one active theme, but it can have as many active plugins as you want — even none. This difference is important because it means that switching from one theme to another prevents you from using the features of the old theme. In contrast, activating a new plugin doesn’t prevent you from making use of the other active plugins.

remember.eps Plugins are capable of changing nearly every aspect of WordPress. The jonradio Multiple Themes plugin (available at http://wordpress.org/extend/plugins/jonradio-multiple-themes) adds the ability to use different themes for specific parts of your WordPress site. Thus, even the limitation of only one active theme on a site can be changed by using a plugin.

Because WordPress can have only one theme but many plugins activated at one time, it is important that the features that modify WordPress are limited to just plugins, whereas themes should remain focused on the appearance of the site. For you, this separation of functionality and appearance is the most important difference between plugins and themes.

tip.eps This separation of functionality into plugins and appearance into themes isn’t enforced by WordPress, but it’s a good practice to follow. You can build a theme that includes too much functionality, and you may start to rely on those functions to make your site work, which ultimately makes it difficult to switch to another theme.

The functionality role of plugins does not mean that control over the appearance of a WordPress site is limited to just themes. Plugins are just as capable of modifying the site's appearance as a theme is. For example, the WPtouch plugin (available at http://wordpress.org/extend/plugins/wptouch) can provide a completely different version of your site to mobile devices such as smartphones. The WPtouch plugin does this by completely replacing the functionality of the theme when the user visits the site from a mobile device.

technicalstuff.eps There are other technical differences that separate plugins and themes. These are mostly important to developers, but it could be important to know these differences as a nondeveloper WordPress user. Plugins load before the theme, which gives plugins some special privileges over themes and can even result in one or more plugins preventing the theme from ever loading. The built-in WordPress functions in the wp-includes/pluggable.php file can be overridden with customized functions, and only plugins load early enough to override these functions. Themes support a series of structured template files and require a minimum set of files in order to be a valid theme. By comparison, plugins have no such structured set of files and require only a single PHP file with a comment block at the top that tells WordPress that the file is actually a plugin. One of the final technical differences is that themes support a concept called child themes, where one theme can require that another theme is present in order to function; no such feature is available to plugins.

Finding Plugins on the WordPress Plugin Directory

The largest and most widely used source of free WordPress plugins is the WordPress Plugin Directory (http://wordpress.org/extend/plugins). As shown in Figure 1-2, this directory is filled with more than 20,000 plugins that cover an extremely broad range of features. Due to the large number of plugins freely available, the fact that each plugin listing includes ratings and details such as user-reported compatibility with WordPress versions, the Plugin Directory should be your first stop when looking for a new plugin to fill a specific need.

9781118383339-fg070102.tif

Figure 1-2: The WordPress Plugin Directory.

Plugins in the Plugin Directory should not be considered “official” or “supported” by WordPress. Anyone can submit plugins to the directory. There are some restrictions on what can be listed on the Plugin Directory, but these are mainly focused on licensing guidelines and blatant attempts to exploit users.

warning_bomb.eps Be critical of anything you add to your site. Plugins receive very little code review once added to the Plugin Directory. Adding buggy code to your site can cause your site to crash. Adding malicious code to your site can enable other people to gain access to your site without your authorization. This isn’t to say that plugins on the Plugin Directory should not be trusted; rather, you should never add anything to your site without doing some checking up on the plugin, theme, or code.

Although you can search for plugins directly on the Plugin Directory site, WordPress has a built-in feature for searching the Plugin Directory. This feature even includes the ability to easily install the Plugin Directory from WordPress without having to download the plugin and upload it to your site.

The following sections show you how to find plugins.

Searching for plugins from the Dashboard

After logging in to your WordPress Dashboard, click the Add New link on the Plugins menu. You then see the Install Plugins page, which you use for installing plugins from inside the Dashboard — it’s also where you can search for plugins. Figure 1-3 shows how the Install Plugins page appears.

9781118383339-fg070103.tif

Figure 1-3: The Install Plugins page.

At the top of the Install Plugins page are a series of links that provide a number of ways to find plugins. (If you’re looking to install a plugin, turn to Chapter 2 of this minibook.)

Search

Figure 1-3 shows the search page. This page allows for searching the WordPress Plugin Directory either by using a list of terms you type in the Search box or by clicking one of the popular tag links to quickly narrow the list of plugins.

After you use either of the search options, the page changes to a Search Results page, which lists the plugins that match the search query. As shown in Figure 1-4, the search results provide a wealth of information about each found plugin.

9781118383339-fg070104.tif

Figure 1-4: Plugin search results after searching for the term Gallery.

For each plugin listed on the page, the search results show the plugin’s name, current version, rating, and description. Two links for each plugin appear below the name of the plugin — click those links to discover more information about the plugin and install it. (I go into detail about these links later in this chapter, in the “Evaluating Plugins before Installing” section.)

Upload

Click the Upload link on the Install Plugins page to display the Upload section, as shown in Figure 1-5. The Upload section allows for easy installation of downloaded plugin Zip files without using FTP or some other method to upload the files to the server. This feature makes it very quick and easy to install downloaded plugin Zip files. While you can do this with plugins you find in the WordPress Plugin Directory, this feature is mostly used to install plugins that are not available in the Plugin Directory because they cannot be installed by searching for them in the Install Plugins page.

After selecting the Zip file to upload and clicking the Install Now button. The options to go back to the Install Plugins page or to activate the newly installed plugin are available.

9781118383339-fg070105.tif

Figure 1-5: The Upload section of the Install Plugins page.

Featured, Popular, and Newest

The Featured, Popular, and Newest pages are all very similar. The Featured page shows just the plugins listed as Featured in the WordPress Plugin Directory. The Popular page includes a listing of all the plugins sorted by their popularity. The Newest page lists all the plugins sorted with the newest plugins listed first with the oldest coming in at the end of the list.

Beyond these differences, each page is identical to the Search Results page. Each of the listed plugins provides options to view more details about the plugin and to quickly install the plugin.

Finding plugins through WordPress.org

The WordPress Plugin Directory is located at http://wordpress.org/extend/plugins. To search for a plugin, follow these steps:

1. Navigate to http://wordpress.org/extend/plugins in your browser.

You see the searchable Plugin Directory. (Refer to Figure 1-2.)

2. Enter the name of the plugin (or a search term relevant to the plugin or a feature you’re looking for) in the search box and then click the Search Plugins button.

The directory lists all plugins that match your query. You can sort your search query by selecting one of the radio buttons underneath the search box: Relevance (default), Newest, Recently Updated, Most Popular, or Highest Rated. Additionally, WordPress.org lists plugins on the right side of the page by Most Popular, Newest Plugins, and Recently Updated to help you find plugins that may interest you.

tip.eps The Most Popular plugins have the greatest number of users and have been downloaded most often by users. In the Plugin Directory, they’re grouped because the majority of WordPress users want to find them easily.

All plugins are tagged with keywords; the most popular tags for all plugins are listed at the bottom of the search page.

Evaluating Plugins before Installing

When you’ve found a plugin via the Dashboard’s Install Plugins page, you can find a wealth of information about that plugin to help you decide whether to download it or go on to the next one.

The methods described here for evaluating plugins are no substitute for thoroughly testing a plugin. Testing the plugin is good practice, unless you’re familiar enough with the code and the developers that bugs or security issues seem unlikely. To test a plugin, set up a standalone site used just for testing, install the plugin, and check for any issues before trusting the plugin on your main site.

tip.eps Look at the version number of the plugin. If it shows Alpha or Beta, the plugin is being tested and may have bugs that could affect your site; you may want to wait until the plugin has been thoroughly tested and released as a full version. Generally, the higher the version number, the more mature (that is, tested and stable) the plugin is.

Don’t use just one of these methods of assessing the trustworthiness. Combine them all to get a sense of what the other users think about the plugin. If the plugin has a five-star rating given by 500 users but has dozens of negative feedback comments with very little positive commentary, don’t trust the plugin very much. However, if a plugin has a three-star rating given by 10 users but has nothing but positive comments, the plugin may have some issues yet may still work very well for some users.

remember.eps Like with many things in life, you have no guarantees with plugins. The best you can do is to find information about the plugin to determine whether or not it is trustworthy.

Details

Click the Details link for a plugin to find information taken from the plugin’s page in the WordPress Plugin Directory. Figure 1-6 shows an example of what details are available. Just like the Plugin Directory page, tabs for Description, Installation, Screenshots, and the Changelog are available.

9781118383339-fg070106.tif

Figure 1-6: Details for the Gallery plugin.

tip.eps Make sure to check out each plugin’s Description page. Some very important information can be found on the plugin’s details that aren’t present in the results listing. When considering a plugin that you don’t have experience with, this information will help you determine how reliable and trustworthy the plugin is.

Ratings

Consider the plugin’s rating and the number of people that submitted a rating. The more people that rated the plugin, the more you can trust the rating; the fewer people that rated the plugin, the less you can trust the rating. A plugin that has fewer than 20 ratings is probably not very trustworthy. A plugin that has more than 100 ratings is very trustworthy. Any plugin rated between 20 and 100 times is acceptably trustworthy.

If a plugin has a large percentage of one- or two-star ratings, treat the plugin very suspiciously. Take the extra step and visit the plugin’s page on the Plugin Directory to see what other people are saying about the plugin. You can do this by clicking the WordPress.org Plugin Page link on the right side of the Description page, in the FYI box. On the plugin’s page, as shown in Figure 1-7, click the View Support Forum button, or the Support link at the top of the page, to see the information posted by users, both positive and negative. You can determine whether the issues other people experienced are likely to hinder your needs.

9781118383339-fg070107.tif

Figure 1-7: The Gallery plugin’s Plugin Directory page showing the Support link.

Downloads

The next detail to consider is the number of downloads. The higher the number of downloads, the more likely the plugin is to work well — plugins that don’t work very well typically don’t pick up enough popularity to get many downloads. If a plugin has hundreds of thousands of downloads or more, it is extremely popular. Plugins with tens of thousands of downloads are popular and may grow even more popular. If the plugin has fewer than 10,000 downloads, you can’t determine anything just by looking at the download count.

remember.eps A low download count should not necessarily be counted against a plugin. Some plugins simply provide a feature that has a very limited audience. Thus, the download count is an indicator but is not proof of quality or lack thereof.

The Compatible Up To and the Last Updated information should be taken very lightly. If a plugin indicates that the compatible-up-to version is for a very old WordPress version, it may have issues with the latest versions of WordPress; however, plenty of plugins work just fine with current versions of WordPress even though they don’t explicitly indicate support. Many people see an up-to-date plugin as a sign of quality and upkeep. This is flawed reasoning because some plugins are very simple and don’t require updating very often. Plugins should not be updated just to bump that number; thus a plugin that hasn’t been updated in a while may be functioning perfectly well without any updates.

Stats

Shown on the Stats tab of the plugin’s page, as shown in Figure 1-8, the number of downloads per day isn’t a foolproof method of getting a trusted plugin, but the Downloads Per Day graph may indicate that people are using the plugin with some success.

9781118383339-fg070108.tif

Figure 1-8: The download history for a plugin within the Plugin Directory.

Support

Click the Support tab below the plugin’s banner to view the support forum for that plugin. This is where users of the plugin request help and assistance, as shown in Figure 1-9. By browsing the support forum for the plugin, you can get a good feel for how responsive the plugin’s developer is to users, and you can also see what types of problems other people are having with the plugin.

9781118383339-fg070109.tif

Figure 1-9: A support forum section for the Jetpack within the Plugin Directory.

Finding Plugins Outside the Plugin Directory

The exact number of plugins that exist outside the Plugin Directory is unknown. There are easily more than a thousand, which means that there is a great variety of plugins that you won’t see in the Plugin Directory. These outside plugins can sometimes be difficult to discover. There are some good starting places though.

Many of the plugins that are not on the Plugin Directory are paid plugins. The official WordPress Plugin Directory allows only free plugins to get listed there. If a plugin is for sale (costs more than a penny), it cannot get listed in the Plugin Directory, so these plugin authors need to find other methods of listing and promoting their products.

Over the past few years, the market for commercial plugins has grown tremendously. It would not be possible to list all the companies that currently offer WordPress plugins in this chapter, so the following listing is a sampling. It’s a way of introducing you to the world of plugins outside the Plugin Directory.

Each of the following sites offers WordPress plugins:

check CodeCanyon (http://codecanyon.net): With thousands of plugins, this online marketplace is the paid plugin version of the Plugin Directory. Just as the Plugin Directory contains plugins from a large number of developers, CodeCanyon is actually a collection of plugins from various developers rather than a single company creating plugins.

check Gravity Forms (http://gravityforms.com): For many WordPress users, Gravity Forms is the plugin to pay for. It is typically the first and last recommendation people give when someone wants to create forms in WordPress.

check iThemes (http://ithemes.com): Starting as a theme developer, iThemes branched out into developing plugins as well. The most popular offering is BackupBuddy, a plugin for backing up and restoring your sites.

check Shopp (http://shopplugin.net): Shopp is a popular plugin that offers a full-featured e-commerce solution that you can integrate into your WordPress site. Essentially, it turns your WordPress site into an online store.

check WooThemes (http://woothemes.com): WooThemes is another theme developer that added plugins to their theme offerings. WooCommerce, their e-commerce solution, has created a lot of buzz.

check WPMU DEV (http://premium.wpmudev.org): WPMU DEV is one of the longest-running commercial plugin shops for WordPress. With over 100 plugins, they have a little of everything.

Although these sites give you a taste of what commercial plugin sites have to offer, having other sources that talk about new and exciting plugins can also be very helpful. Many popular WordPress news sites talk about all things WordPress, including reviews and discussions about specific plugins. Check out the following sites if you want to know more about what plugins are being talked about:

check WPBeginner (http://wpbeginner.com): This site is dedicated to helping new WordPress users get up and running quickly. It also features a very active blog talking about a variety of topics. The site often features posts that talk about how to use plugins to create specific types of solutions for your site.

check WPCandy (http://wpcandy.com): WPCandy is an all-things-WordPress news site. If there is a buzz on the topic in the WordPress world, you're likely to find discussions on it here.

check WPMU (http://wpmu.org): Run by the Incsub team, the same team behind WPMU DEV, WPMU.org is a very active WordPress news site. It features multiple new blogs posts per day and often has numerous plugin reviews each week. This site is a great place to discover new plugins to try out.

tip.eps One of the great things about using a community or news site to discover new plugins is that you aren’t alone on deciding on whether to trust a plugin. You can get some outside opinions before you take a chance on a plugin.

If you aren’t finding what you want in the Plugin Directory, don’t know of anyone that offers a solution you are looking for, and aren’t seeing anything on community sites, it’s time to go to a trusty search engine, such as Google, and see what it has for you.

A good way to get started is to search for the words wordpress and plugin along with one to a few words describing the feature you want. For instance, if you want a plugin that provides more advanced image gallery features, search for wordpress plugin image gallery. As long as your search isn’t too specific, you’re likely to get many results. The results will often contain blog posts that either review specific plugins or have a listing of recommended plugins.

warning_bomb.eps There are developers out there who include malware, viruses, and other unwanted executables in their plugin code. Your best bet is to use plugins from the official WordPress Plugin Directory or purchase plugins from a reputable seller. Do your research first and read up on plugin security in Book II, Chapter 5.

Comparing Free and Commercial Plugins

There are thousands of plugins available for free and thousands of plugins that have a price. What are the benefits of a free plugin versus a paid plugin? This is a tough question to answer.

It’s tempting to think that some plugins are better than others, and that is why they cost money. Unfortunately, things aren’t that simple. Some amazing plugins that I would gladly pay for are free, and some terrible plugins that I wouldn’t pay for have a cost.

Oftentimes a paid plugin includes access to support specifically for that plugin. This means that the company or individual selling the plugin is offering assurance that if you have problems you will receive support and updates to address bugs and other issues.

Free plugins typically have places to make support requests or to ask questions, but there are no requirements to ensure that the developer responds to your requests within a certain period of time or at all. Even though developers have no obligation to help with support requests by their plugin’s users, many developers work hard to help users with reported issues and other problems. Fortunately, because many free plugins are on the Plugin Directory and the Plugin Directory includes a built-in support forum and rating score, it is easy to see how responsive the plugin author is to support issues.

Personally, I believe that the reason that the commercial plugin model is able to work in an environment that has tens of thousands of free plugins is that many WordPress users want the assurance that when they have problems, they have a place to ask questions and get help with those problems.

So if people can get paid to produce plugins, why are so many plugins free? This is another great question.

One reason that so many plugins are available for free is that many WordPress developers are very generous and believe in sharing their plugins back with the community. For other developers, having their plugins available to the millions of WordPress via the Plugin Directory is a great way of marketing their talents, which can lead to contract work and employment. Buzz words on a resume are far less valuable than being able to point people to a plugin you wrote that was downloaded thousands or millions of times.

Another reason for releasing a free plugin is to entice people to pay for upgrades. This is often times referred to as a “freemium” plugin. Freemium plugins often have paid plugins that add features to the free plugin. Thus, the freemium model is a mix of the free and paid plugin models and gets the best of both worlds. The free plugin can be on the Plugin Directory, thus giving the plugin a large amount of exposure. You can get a feel for how the plugin functions, and if you want the additional features, you can purchase the paid plugin.

An example of the freemium model is the WP e-Commerce plugin (http://getshopped.org). The main plugin is available for free in the Plugin Directory, yet it supports a large number of paid plugins to add more features. By itself, the WP e-Commerce plugin turns the site into a shopping cart. To extend this functionality, paid plugins are available to add payment processing for specific credit card processors, drag-and-drop shopping carts, download managers, and many other features.

The reality is that the biggest difference between free and paid plugins is that sometimes you won’t find what you need in a free plugin and will have to go with a paid plugin. In the end, what you download is up to you. There are many great free plugins and many great paid plugins. If you want the features offered by a paid plugin and are willing to pay the price, paid plugins can be a very good investment for your site.

tip.eps Many free plugins have a link to a donation page. If there is a free plugin that you find very valuable, please send a donation to the developer. Most developers of free plugins say that they rarely, if ever, receive donations. Even a few dollars can really encourage the developer to keep updating old plugins and releasing new free plugins.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.95.150