Is Contact Form 7 really necessary?

WordPress Mobile Speed

Updated


There are no affiliate links on PagePipe.

Contact form
Myth: A contact form is the standard now for most sites.
The usual recommendation is Contact Form 7.
We don’t believe contact forms are necessary – especially for mobile. They slow down your site. Use a large-size, email text link instead with Email Address Encoder plugin, download size: 5k.

Many WordPress site owners cause damage when adding a popular contact-form plugin. Contact forms can hurt your load time. Not just on your contact page where the form appears – but on every single page of your site.

We love free stuff. Contact Form 7 is absolutely free. But we want the best free stuff money can’t buy. So we test a lot of free plugins. Before adding the popular Contact Form 7, our special test page had the following specifications:

BEFORE
Page size: 29.6k, requests: 5, load time: 543ms.

After installing and activating Contact Form 7, here’s what happened:

AFTER
Page size: 78.3k, requests: 10, load time: 768ms.

Wait! The page size more than doubled. The number of requests doubled. And speed slowed down by 40 percent. What happened?

OK. We admit this is a worst-case scenario. We’re using a test theme, Sobe, that doesn’t enqueue jQuery. For extreme speed, we often build WordPress sites without jQuery. PagePipe.com used to use Frank theme which doesn’t enqueue jQuery either.

But when you install Contact Form 7, it needs jQuery. That file combined with the needed Javascript and CSS to make the form work adds the 5 extra HTTP requests. Here’s the list of Gzip file sizes added:

  • contact-form-7/styles.css 944B
  • wp-includes/js/jquery/ 33.4k
  • wp-includes/js/jquery/ 4.3 k
  • jquery.form.min.js/contact-form-7/jquery.form-min.js 6.1k
  • plugins/contact-form-7/scripts.js 3.7k

That’s 48.4k total weight added site-wide to every single webpage. Even if we don’t have a form shortcode on any page or widget.

WordPress Form Mystery: Why does the silly form load everywhere – instead of only on the page with the shortcode like it should?

Contact Form 7 isn’t the only form plugin that loads its Javascript and CSS files on every page. This is not uncommon for most slider plugins, too. We call this global loading – or site drag. It’s a bad way to do things for speed. While it’s common, it’s not a universal practice. We’ve found sliders and forms that only load code on pages containing their shortcodes. How can you tell? Only by testing. There is nothing in the plugin documentation telling if this will happen. It’s a negative thing – so why would they publish it? Honesty perhaps?

You’d think those plugins that have better behavior would advertise speed benefits – but they don’t. Not yet anyway.

When website owners do site speed testing, they eventually observe plugins get loaded on every page, adding to code bloat and slower load times everywhere. They hopelessly think, “I don’t need these activated on all pages, but I have no way of controlling this.” This isn’t true.

What if a plugin could load on-demand? Even just parts of it, only when it was needed, instead of on every page load? These solutions exist.

Loading plugins redundantly and globally decreases the speed of your pages. It’s best to deactivate heavy plugins on pages where they’re not needed. JavaScript, CSS files, and SQL queries are then reduced during page load.

A popular WordPress form plugin is installed on over 1 million WordPress websites. The favored culprit is Contact Form 7. It adds 37k page weight to all pages on your website. Even when the plugin is only used on one page – such as your contact page – the plugin “globally” slows down all pages. This “global” activation is even more problematic for heavier plugins like Google Maps or social media controls.

Other form plugins are lighter and faster. But substitution isn’t the solution or our main concern. What if we absolutely needed to use Contact Form 7 plugin because there is a special addon plugin that gives us more extended utility (And, there are addons!) How can you prevent global loading?

We fix it with a plugin that restricts a “heavy” plugin to just the pages where it’s needed. Plugin Logic (15k compressed download file) or Plugin Organizer (295.1k compressed download) both let you deactivate or activate plugins on a page-by-page basis.

With these plugins, you can selectively disable plugins by any post type or WordPress-managed URL. But if you’ve read our recommendations about plugins and themes, you know we usually choose the lightest plugin when possible. Smaller file size usually equates with efficiency, which means it will probably load and work faster.

Of the two plugins, Plugin Logic (only 100+ active installs) is the simpler and easier to use. It hasn’t been downloaded much yet compared to Plugin Organizer (10,000+ installs). Using the Plugin Organizer is more complicated because it let’s you change the plugin load order. Changing the load order can help prevent plugin conflicts, which is a nice bonus feature if you need it – but we don’t, so we’ll stick with Plugin Logic.

Video Tutorials for Plugin Organizer (The fact people created video tutorials indicates the plugin setup is complicated.):

WordPress “Plugin Organizer” tutorial – Nov. 2015

Plugin Organizer Tutorial for Speeding Up WordPress Blog

How to Use Plugin Organizer WordPress Plugin to Fix Conflicting WordPress Plugins

It’s true. Most plugins load virtually all their code, every single time, on every single WordPress page and post. The plugin author is at fault for not correctly coding their plugin to properly load things only when they’re needed.

Sites get bogged down from slow (or too many) database queries or too many CSS/JS files loading. It really isn’t WordPress’ job to control these things. It’s the plugin author’s job.

Plugins authors should be better educated on how to properly write their plugins so they do not load needlessly. Yes. It’s an education problem. It’s not super technical or even a flaw really.

It isn’t the responsibility of WordPress to control third-party plugins. Changes to any particular plugin requires talking to the individual plugin authors. There are more than 55,000 plugins. Big education job. We don’t have the resources to do it. Do you?

How can we say this without disturbing the natives? Plugin authors frequently ignore being empathetic to user’s speed needs. The fault lies in being in too big of a hurry to do it right – or not being creative. They erroneously don’t think milliseconds are a problem. This is speed apathy.

Things will get better. Mobile has changed users need and perception for faster, speedier plugins.

Do you suppose 200 millisecond per page global-site waste is insignificant? Do you care about page speed for mobile users? They know if you do. Page speed is web hospitality. Do you serve pages slowly? Then your site may be apathetic and rude.

Now let’s return back to the topic of Spam:

If you get a lot of form Spam then additionally you must protect Contact Form 7 with an anti-spam plugin. Usually another popular plugin – Akismet and other plugin alternatives.

Contact Form 7 is the second most popular WordPress plugin of all time. It has hundreds of extensions or addons made by third-parties to enhance it’s features. Over 42,546,968 downloads. And presently, has 1+ million installs. Mid-2006 is when Takayuki Miyoshi (Japan) uploaded Contact Form 7 to the plugin repository. That makes it over 10 years old – and still ticking.

So what can you do to speed things up? There are three things:

  1. As we just described: Use a free plugin called Plugin Logic and activate your contact form only on your contact page. Just slow down that single page instead of all pages – especially protect your Home page speed. We use Plugin Logic all of the time now for speed improvements.
  2. Use an alternative free plugin (see list below). Preferably a fast form that has Spam-protection built in (2-for-1 deal).
  3. Don’t use a form. Use an email text link instead. Screaming-fast sites do just that simple solution. Especially for mobile users.

60 free WordPress contact-form plugins with links.

Yes. Contact Form 7 is on the list. Contact Form 7 isn’t bad. We don’t hate it. But better alternatives exist for your site now. New contact form plugins appear and losers disappear on a regular basis. Our list is the “state of the moment.” Tomorrow it’ll be obsolete already because the 55,000+ plugin repository is growing between 20 to 25 percent per annum. Gads! How can we keep up with the changes?

Ranked plugins are in descending download package size (expressed in megabytes). Compressed package size is indicative of an author’s concern for optimization. That affects page speed. That’s our concern.

This ranking by package size is our crude rule of thumb used to cull plugins. It beats randomly loading and testing 60 separate plugins one at a time for hours. We start with the best speed candidates. Then work our way down the list until we find the first fast plugin that satisfies our needs. Is that safe? No. You still have to check what user forums say about a plugin’s reputation. And check with security vulnerability reporting plugins.

Small packages usually yield the fastest plugins. That doesn’t mean they’re any good. They still need torture testing.

Form builders usually are the plugin packages with the most bloat.

Plugin retention is the number of active installs divided by the number of all-time downloads. We call this the “satisfaction factor.” This number gives us an idea of how many plugins are actually kept and used after testing or temporary use. Small numbers show “fallout.” The higher the retention number the better it’s market acceptance and longevity. This is a more important benchmark than popularity or active installs.

Before you look at the table below, let’s talk about the TOP10 speed candidates – and winner. We installed and tested each of the contact forms with WordPress. It was boring work – but better we do it than you. Right? Besides we have an insatiable curiosity. We disqualified several immediately.

Group One: Instant fails.

We eliminated Powr Form Builder because it’s cloud-based (slow). And additionally charges for usage above 100 form emails per month. We don’t like that stuff.

We also axed SimpleModal Contact Form simply because it had a “clear” button. Including this button in a form is bad usability. It’s explained in the book, “Don’t Make Me Think.” Read it for free PDF download. Accidentally clearing a filled form with the wrong button is the ultimate user frustration. So clear buttons are page suicide.

Group Two: ReCAPTCHA slow downs.

reCAPTCHA establishes that a computer user is human. But you knew that.

  1. NM Contact Form plugin was the worst – adding 552 milliseconds. This is because of requesting Google’s free, cloud-based reCAPTCHA, a Spam-prevention utility.
  2. AntiRobot was the second-heaviest load time after installation. Adding 354 milliseconds to the baseline page speed for the same reason – reCAPTCHA loading killed it.

Group Three: Forms that enqueue jQuery.

jQuery is an oft-used Javascript library and usually adds between 30k and 70k extra page weight. Some WordPress sites already enqueue jQuery with sliders, top-of-page buttons, or other animation. Then, it’s no big deal to add these contact forms. But for extreme speed, we frequently use themes that don’t use jQuery.

Some WordPress themes load fast because they don’t activate jQuery JavaScript functions. External JavaScript calls temporarily block web page rendering. Google Chrome is working to remedy this by moving JavaScript. This future feature is like deferred, lazy-loading images that appear below the web page fold. But that addition to browsers isn’t here yet.

One of the faster free themes we’ve experimented with and reviewed is Frank Theme. It uses the “Don’t use jQuery” speed strategy. The same goes for the Sobe theme.

Note: We did two of our experimental theme case studies using the fast Frank theme: One and Two.

JavaScript affects the critical rendering path.

Before a browser can make a page, it builds the HTML markup. If the browser encounters a CSS script or JavaScript, it must wait for the scripted resource to download. That pause increases latency for page rendering.

JavaScript is a client-side, dynamic-scripting, program language. Web programmers use it to alter displayed page content. JavaScript is one alternative to using server-side PHP scripting language.

jQuery is usually one of the biggest chunks of WordPress code. It deserves special attention and treatment.

jQuery is a free, open-source, cross-platform JavaScript library. This library facilitates the creation of dynamic web pages and web applications. WordPress theme developers normally use the resident jQuery included with WordPress. But just because it’s there doesn’t mean it’s “on.” jQuery activation is optional – such is the case in the Frank theme and other fast themes.

Optional WordPress plugins may use jQuery for animation like sliders or other interactive elements. So the theme may not use jQuery but a plugin might. You can know for certain by testing with Yslow or WebPageTest.org.

For example, the Frank theme is fast but if you add a j Query-activating slider plugin, suddenly all site pages will slow down. It defeats the purpose of using themes that don’t use JavaScript. The same thing will happen if you use the popular Contact Form 7 plugin. JQuery is then loaded globally for every page, not just your Contact page. Other contact forms, like Very Simple Contact Form plugin, (14k, 10,000+ installs) do not require jQuery.

One of the bigger benefits of using jQuery is the seamless handling of cross-browser issues. JavaScript usage differs among browsers and can cause difficulty. The authors of jQuery have made JavaScript programming work much easier.

Almost every browser on the planet already has Google’s jQuery CDN address loaded in cache.

You can change the WordPress code to substitute Google’s CDN hosted jQuery. But there’s an easier way. Just use WP jQuery Plus. It’s a WordPress plugin that loads jQuery from Google’s free Content Distribution Network (CDN). Users geographically far from you can download jQuery faster. The Google version of jQuery is also Gzip compressed and minified for fastest page loading. Yet, even though Google’s CDN servers are fast, it’s still not the biggest motivating gain.

Note: An alternative Use-Google-Libraries plugin exists but WP jQuery Plus is better because it has a failsafe or fallback. If Google jQuery doesn’t respond, the plugin just loads the slower, local WordPress version.

Potential performance benefits:

Using the Google Library CDN eliminates some HTTP requests from your site. This allows more of your local content to downloaded in parallel. It doesn’t make a gigantic difference for users with a modern six-concurrent connection browser. But for those still running older browsers, the difference is noticeable.

The greatest benefit of using Google’s CDN is that your users may not need to download jQuery at all. The chance is high that a user already has these files cached for up to one year.

No matter how well optimized your site is, if you’re using a local WordPress jQuery then it must be downloaded at least once. If forced this way, the user’s browser ignores dozens of identical copies of cached jQuery.

CDN-hosted jQuery references refer to the exact same file. The browser trusts those files are identical and won’t waste time re-requesting the cached file. Thus, the browser uses only a single copy that’s cached on-disk, regardless of which site the CDN references appear on.

Google’s CDN serves the jQuery file with headers that cache the file for up to one year. This creates a potent effect of “cross-site caching.”

The most trafficked sites on the Internet already use the Google CDN to serve jQuery. Many users will never have to make a single HTTP request for jQuery. It only needs downloading once before.

Letting Google handle part of your site’s JavaScript footprint free of charge is too good to pass up. It’s an easy optimization because Google CDN has a vast caching advantage.

Note: If your theme and a plugin both use jQuery, your pages may end up with jQuery loaded twice causing even slower pages. The only way to know for certain is to check using Yslow or WebPagetest.org.

Some claim the WP jQuery Plus plugin isn’t a “real” speed fix because it’s small and inconsequential. jQuery by itself is 91KB when it’s minified and further optimized to 33k with Gzip compression. For many, this 33k footprint left by jQuery is insignificant when the average homepage is a heavy 1.3M page weight. But if page weight is efficient (around 100k, for example) jQuery weight becomes one-third of the page weight. That’s significant overhead. Plus, do you know how to minify and Gzip your site? If not, this is a easy solution to reduce a 97k load by over 70 percent.

Increased parallelism is sometimes argued as an invalid benefit of Google CDN since there’s a WordPress-coding workaround: Just load jQuery in the footer rather than the header. This way pages load scripts faster. For WordPress, it’s done by editing the functions.php header code. But there’s no plugin for this code change. It requires some bravery and skill. We just don’t recommend it – even if it makes the plugin unnecessary.

The genius for this speed strategy is the pervasive ubiquity of the Google CDN address in browser caches. We recommend you try out the WP jQuery Plus plugin and test if it speeds up your page load times.

Note: A rebuttal/rant about this approach is explained in the article, “Why Loading Your Own jQuery is Irresponsible” Be sure to read the comments. They explain why “The WordPress Way” isn’t always the right way.

We return to our list of Contact Forms. These not-so-bad jQuery form plugins included:

  1. Just Ajax Contact Form with Captcha (204ms added).
  2. Quick Contact Form (229ms added).

Group Four: One fast form is a widget for footers and sidebars.

  1. CB Contact Form only adds 22 milliseconds. But isn’t a conventional form for contact pages. Still a winner in our book.

Group Five: The three fastest contact form plugins.

  1. Very Simple Contact Form (No added page weight! Only 1 extra HTTP request.)
  2. Simple Basic Contact Form (45 milliseconds added).
  3. SEOS Contact Form (143 milliseconds added).

These three are first-place tied. Especially since testing can fluctuate by those close numbers on our deliberately-chosen, shoddy host (GoDaddy). So we’ll use how the forms look to choose the best. Below: Three installations on a gray background page.

SEOS Contact Form Bonus! We could customize the button with our own words, “SIGNUP” easily in the plugin control panel. Stacking labels on top of fields is not good usability. It also occupies more vertical space. Includes Captcha-addition question.

Simple Basic Contact Form – Nice! ‘Send Email” label on button. That works. Nice placement of labels by the left side. That’s the best usability from user testing. Includes Captcha-addition question for antispam.

Very Simple Contact Form – Oh, oh! They used the word “submit” on the SEND button. Submit is what slaves do. That’s coder-jargon. “Enter number” for antispam instead of addition confuses some users. We know this from our user testing.

Our recommendation for general use on extreme speed sites: Simple Basic Contact Form. But it’s a matter of what works for you and your audience, so test.

Here’s the list of 58 Contact Form plugins: (ranked by smallest download size to largest)
AntiRobot Contact Form
POWr Form Builder cloud
Very Simple Contact Form
Just Contact Form
Seos Contact Form
CB Contact Form
NM Contact Forms
SimpleModal Contact Form
Jazzy Forms
Simple Basic Contact Form
Slick Contact Forms
MN Contact Form
Quick Contact Form
Simple Contact Forms
DD Contact Form
HTML Contact Form
Contact Form With Captcha
PirateForms
Contact Form Email
FormBuilder
Contact Form Clean and Simple
Contact Form
Calculated Fields Form
PROPER Contact Form
123ContactForm for WordPress
Contact Form 7
Contact Form With Shortcode
Visual Form Builder
Contact Form Pro
Ultimate Form Builder Lite
Responsive Contact Form
Nino contact form
Forms
Contact Form Builder by vCita
Contact Form by Supsystic
WPForms Lite
Perfect Easy & Powerful Contact Form
First Contact Form
Formidable Forms
Form Plugin
Contact Bank
FormGet Contact Form
BigContact Contact Page
WCP Contact Form
Fast Secure Contact Form
Contact Forms by Cimatti
Smart Forms
Contact Form Generator
Creative Contact Form
Custom Contact Forms
Form Generator
WR ContactForm
Form Builder
NEX-Forms – Ultimate Form builder
Contact Form by BestWebSoft
Contact Form
Form
Ninja Forms
Cool Contact

Godspeed-

Steve Teare
performance engineer
June 2021

 

PagePipe Site Tuning Services for Speed

Instead of band-aid approaches, we drill down to the root cause of your slow site. This is origin optimization. Also known as site tuning. To do this, we analyze site components:

  • Hosting
  • Theme
  • Plugins
  • Scripts and third-party services.
  • Images and media library.
  • We minimize globally loading plugin effects.

Find out more details about Site TuningGet Speed!