{"id":329751,"date":"2026-07-01T05:09:52","date_gmt":"2026-07-01T05:09:52","guid":{"rendered":"https:\/\/ru.wordpress.org\/plugins\/defer-for-contact-form-7\/"},"modified":"2026-10-18T04:27:34","modified_gmt":"2026-10-18T04:27:34","slug":"defer-for-contact-form-7","status":"publish","type":"plugin","link":"https:\/\/id.wordpress.org\/plugins\/defer-for-contact-form-7\/","author":23224545,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.0","stable_tag":"1.2.0","tested":"7.1.3","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Defer for Contact Form 7","header_author":"Vitalii Ryabinin","header_description":"\u0421\u043d\u0438\u043c\u0430\u0435\u0442 Contact Form 7 \u0441 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0430: \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 wp-hooks\/wp-i18n \u0432 footer \u0438 \u0433\u0440\u0443\u0437\u0438\u0442 CSS \u0444\u043e\u0440\u043c\u044b \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e. \u0411\u0435\u0437 \u0443\u0434\u0430\u0440\u043e\u0432 \u043f\u043e PageSpeed.","assets_banners_color":"391e6b","last_updated":"2026-10-18 04:27:34","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/rowan-web.ru\/en\/blog\/defer-for-contact-form-7\/","header_author_uri":"https:\/\/rowan-web.ru\/en\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":418,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"ryabininvitaliy","date":"2026-07-01 05:09:28","revision":3592132},"1.1.0":{"tag":"1.1.0","author":"ryabininvitaliy","date":"2026-09-13 06:37:51","revision":3693382},"1.2.0":{"tag":"1.2.0","author":"ryabininvitaliy","date":"2026-10-18 04:27:34","revision":3752539}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3592120,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3592120,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3592120,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3752538,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3752538,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.2.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3752538,"resolution":"1","location":"assets","locale":"","width":1078,"height":909}},"screenshots":{"1":"Plugin settings page under Contact \u2192 Performance: defer\/async toggles, the lightweight anti-spam options and the blocked-spam counter."}},"plugin_section":[],"plugin_tags":[2656,1152,598,1513,247],"plugin_category":[42,54],"plugin_contributors":[269672],"plugin_business_model":[],"class_list":["post-329751","plugin","type-plugin","status-publish","hentry","plugin_tags-anti-spam","plugin_tags-contact-form-7","plugin_tags-honeypot","plugin_tags-pagespeed","plugin_tags-performance","plugin_category-contact-forms","plugin_category-security-and-spam-protection","plugin_contributors-ryabininvitaliy","plugin_committers-ryabininvitaliy"],"banners":{"banner":"https:\/\/ps.w.org\/defer-for-contact-form-7\/assets\/banner-772x250.png?rev=3752538","banner_2x":"https:\/\/ps.w.org\/defer-for-contact-form-7\/assets\/banner-1544x500.png?rev=3752538","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/defer-for-contact-form-7\/assets\/icon.svg?rev=3592120","icon":"https:\/\/ps.w.org\/defer-for-contact-form-7\/assets\/icon.svg?rev=3592120","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/defer-for-contact-form-7\/assets\/screenshot-1.png?rev=3752538","caption":"Plugin settings page under Contact \u2192 Performance: defer\/async toggles, the lightweight anti-spam options and the blocked-spam counter."}],"raw_content":"<!--section=description-->\n<p>On every page Contact Form 7 loads its dependencies (wp-hooks, wp-i18n) and its CSS into the <code>&lt;head&gt;<\/code>, blocking first paint. This plugin fixes that:<\/p>\n\n<ul>\n<li><strong>Defer CF7 core<\/strong> \u2014 moves wp-hooks\/wp-i18n to the footer (you cannot <code>defer<\/code> them: an inline <code>wp.i18n.setLocaleData<\/code> block runs synchronously and would throw \"wp is not defined\"). CF7's scripts leave the critical path.<\/li>\n<li><strong>Async CSS<\/strong> \u2014 the form stylesheet loads via <code>media=print<\/code> + onload-swap.<\/li>\n<\/ul>\n\n<p>Both optimizations are idempotent and safe on every page. Strict dependency: with Contact Form 7 inactive, the plugin does nothing.<\/p>\n\n<h4>Lightweight anti-spam<\/h4>\n\n<p>Two spam checks that need no external service and add no extra requests. Both are <strong>off by default<\/strong> \u2014 enable them under Contact \u2192 Performance if you don't already run another anti-spam plugin for your forms.<\/p>\n\n<ul>\n<li><strong>Honeypot field<\/strong> \u2014 a field hidden from visitors is added to every form; bots fill it in and the submission is marked as spam.<\/li>\n<li><strong>Time trap<\/strong> \u2014 submissions sent faster than a human could fill in the form (configurable, 3 seconds by default) or sent without JavaScript are marked as spam. The time is measured in the visitor's browser, so it works with page caching.<\/li>\n<\/ul>\n\n<p>The settings page shows how many spam submissions have been blocked.<\/p>\n\n<h4>A note on jQuery<\/h4>\n\n<p>This plugin does NOT defer jQuery \u2014 on purpose. Deferring jQuery is only safe when EVERY jQuery-dependent script on the site is also deferred or in the footer; on an arbitrary site that is not guaranteed and breaks inline scripts in the head.<\/p>\n\n<h3>Pro version<\/h3>\n\n<p>Defer for Contact Form 7 Pro adds lazy-loaded anti-spam captcha \u2014 spam protection without a PageSpeed hit. Pick one provider (they are not run at the same time):<\/p>\n\n<ul>\n<li><strong>Google reCAPTCHA v3<\/strong> \u2014 score-based. api.js loads only on the first interaction with a form, so it never appears in Lighthouse\/PSI. The score check is server-side; a fresh single-use token is fetched for every submission. The badge is hidden with the required Google disclaimer (GDPR-friendly); configurable score threshold and action label.<\/li>\n<li><strong>Yandex SmartCaptcha<\/strong> \u2014 invisible mode, no widget shown unless the visitor looks suspicious. Same lazy-loading approach, binary server-side check. A practical alternative for sites served from Russia, where Google's services aren't always reliable.<\/li>\n<\/ul>\n\n<p>Pro also adds detailed spam statistics: a breakdown by reason (honeypot, time trap, captcha), a 30-day chart and a log of what bots typed into your forms. The log stores no IP addresses, cuts every value to 100 characters and keeps entries for 30 days.<\/p>\n\n<p>The free version stays fully functional on its own.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin can connect to the following third-party services:<\/p>\n\n<ul>\n<li><strong>Freemius<\/strong> (free and Pro) \u2014 licensing, updates and the optional usage-data opt-in. Nothing is sent unless the site administrator opts in (or activates a Pro license). When enabled, it sends the site URL, WordPress\/PHP\/plugin versions and the administrator's name and email. <a href=\"https:\/\/freemius.com\/terms\/\">Terms<\/a>, <a href=\"https:\/\/freemius.com\/privacy\/\">Privacy Policy<\/a>.<\/li>\n<li><strong>Google reCAPTCHA v3<\/strong> (Pro only, when selected and configured) \u2014 the visitor's browser loads <code>https:\/\/www.google.com\/recaptcha\/api.js<\/code> on the first interaction with a form; on submit the site sends the captcha token and the visitor's IP address to <code>https:\/\/www.google.com\/recaptcha\/api\/siteverify<\/code>. <a href=\"https:\/\/policies.google.com\/terms\">Terms<\/a>, <a href=\"https:\/\/policies.google.com\/privacy\">Privacy Policy<\/a>.<\/li>\n<li><strong>Yandex SmartCaptcha<\/strong> (Pro only, when selected and configured) \u2014 the visitor's browser loads <code>https:\/\/smartcaptcha.cloud.yandex.ru\/captcha.js<\/code> on the first interaction with a form; on submit the site sends the captcha token and the visitor's IP address to <code>https:\/\/smartcaptcha.cloud.yandex.ru\/validate<\/code>. <a href=\"https:\/\/yandex.ru\/legal\/cloud_termsofuse\/\">Terms<\/a>, <a href=\"https:\/\/yandex.ru\/legal\/smartcaptcha_notice\/\">Data processing notice<\/a>.<\/li>\n<\/ul>\n\n<h3>Support<\/h3>\n\n<p>Questions, bug reports or feature requests: the plugin's support forum on WordPress.org, or https:\/\/rowan-web.ru\/en\/blog\/defer-for-contact-form-7\/<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>defer-for-contact-form-7<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the ZIP via Plugins \u2192 Add New \u2192 Upload.<\/li>\n<li>Activate the plugin. Contact Form 7 must be active.<\/li>\n<li>Both optimizations are on by default \u2014 there is nothing else to configure.<\/li>\n<li>To toggle them, go to <strong>Contact \u2192 Performance<\/strong>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20work%20with%20caching%2Foptimization%20plugins%3F\"><h3>Does this work with caching\/optimization plugins?<\/h3><\/dt>\n<dd><p>Yes. Version 1.2.0 was tested with WP Rocket, Autoptimize, W3 Total Cache, WP-Optimize and LiteSpeed Cache, including page caching, JS\/CSS combining, \"defer all JS\" and \"delay JS execution\". Note that when an optimizer combines CSS into one file, the form stylesheet is loaded the way that optimizer decides, so the async CSS option has no effect there.<\/p>\n\n<p>The plugin's own tiny scripts (time trap, Pro captcha loader) are marked so that optimizers don't delay them \u2014 otherwise a visitor who autofills the form and submits right away could be flagged as spam.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20send%20any%20data%20anywhere%3F\"><h3>Does the plugin send any data anywhere?<\/h3><\/dt>\n<dd><p>The deferring, async CSS, honeypot and time trap features make no external requests. The only external service in the free version is the optional Freemius opt-in \u2014 see \"External services\" below. Blocked-spam counters are stored in your own database and contain no submission content.<\/p><\/dd>\n<dt id=\"will%20the%20honeypot%20conflict%20with%20my%20other%20anti-spam%20plugin%3F\"><h3>Will the honeypot conflict with my other anti-spam plugin?<\/h3><\/dt>\n<dd><p>It can run alongside other checks, but there is no need to double up \u2014 that's why both checks are off by default. Turn them on only if your forms are not protected yet.<\/p><\/dd>\n<dt id=\"does%20this%20support%20yandex%20smartcaptcha%3F\"><h3>Does this support Yandex SmartCaptcha?<\/h3><\/dt>\n<dd><p>Yes, in the Pro version \u2014 as an alternative to Google reCAPTCHA v3. Choose the provider under Contact \u2192 Performance; only one is active at a time.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>New: honeypot field and time trap \u2014 lightweight anti-spam with no external services. Off by default.<\/li>\n<li>New: blocked-spam counter on the settings page.<\/li>\n<li>Pro: spam statistics \u2014 breakdown by reason, 30-day chart and a log of blocked submissions.<\/li>\n<li>Fixed: possible fatal error \"Cannot redeclare class ComposerAutoloaderInit\u2026\" when another plugin bundles an identical Composer autoloader.<\/li>\n<li>The Pro section of the settings page is now a plain description instead of disabled fields.<\/li>\n<li>Inline scripts and styles moved to enqueued files.<\/li>\n<li>Async CSS now rewrites the stylesheet tag with the WordPress HTML API (no duplicate media attribute).<\/li>\n<li>Pro: the form no longer hangs if the captcha provider never responds (wrong key, blocked script) \u2014 after 10 seconds it is submitted and checked on the server.<\/li>\n<li>Tested with WordPress 7.1 and with WP Rocket, Autoptimize, W3 Total Cache, WP-Optimize and LiteSpeed Cache.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Pro: added Yandex SmartCaptcha (invisible mode) as an alternative anti-spam provider alongside Google reCAPTCHA v3 \u2014 switch between them under Contact \u2192 Performance.<\/li>\n<li>Updated the bundled Freemius SDK to 2.13.4.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: CF7 core defer + async CSS.<\/li>\n<\/ul>","raw_excerpt":"Takes Contact Form 7 off the critical rendering path: moves its head scripts to the footer and loads the form CSS asynchronously. No PageSpeed hit.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/329751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=329751"}],"author":[{"embeddable":true,"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ryabininvitaliy"}],"wp:attachment":[{"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=329751"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=329751"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=329751"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=329751"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=329751"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/id.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=329751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}