0
0
Wordpressframework~20 mins

Performance plugins in Wordpress - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
πŸŽ–οΈ
WordPress Performance Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ component_behavior
intermediate
2:00remaining
How does caching improve WordPress site speed?

Imagine your WordPress site uses a caching plugin. What happens when a visitor loads a page?

AThe plugin compresses images on the page to reduce their size before loading.
BThe plugin disables all plugins temporarily to speed up the page load.
CThe plugin automatically updates WordPress core to the latest version for better speed.
DThe plugin stores a static copy of the page and serves it quickly without running PHP or database queries each time.
Attempts:
2 left
πŸ’‘ Hint

Think about what happens when a page is generated once and then reused.

πŸ“ Syntax
intermediate
2:00remaining
Identify the correct way to enqueue a performance plugin's script in WordPress

Which code snippet correctly enqueues a JavaScript file for a performance plugin in WordPress?

Awp_enqueue_script('perf-script', plugin_dir_url(__FILE__) . 'js/perf.js');
Badd_action('init', function() { wp_enqueue_script('perf-script', 'js/perf.js'); });
Cadd_action('wp_enqueue_scripts', function() { wp_enqueue_script('perf-script', plugin_dir_url(__FILE__) . 'js/perf.js', [], null, true); });
Dadd_filter('wp_enqueue_scripts', function() { wp_enqueue_script('perf-script', 'js/perf.js'); });
Attempts:
2 left
πŸ’‘ Hint

Remember which hook is used to add scripts and how to properly call wp_enqueue_script.

πŸ”§ Debug
advanced
2:00remaining
Why does the site load slowly despite using a caching plugin?

A WordPress site uses a caching plugin but still loads slowly. Which of these is the most likely cause?

AThe caching plugin updates WordPress core automatically, causing delays.
BThe caching plugin is set to clear cache on every page load, so no cached pages are served.
CThe caching plugin disables CSS files, making the site load slower.
DThe caching plugin compresses images too much, causing slow loading.
Attempts:
2 left
πŸ’‘ Hint

Think about what happens if the cache never stays stored.

🧠 Conceptual
advanced
2:00remaining
What is the role of a minification plugin in WordPress performance?

Which best describes what a minification plugin does to improve site speed?

AIt removes unnecessary characters like spaces and comments from CSS and JavaScript files to reduce file size.
BIt caches pages as static HTML to avoid PHP processing on each request.
CIt compresses images to smaller sizes without quality loss.
DIt disables unused plugins to reduce server load.
Attempts:
2 left
πŸ’‘ Hint

Think about how file size affects loading speed and what can be removed safely.

❓ state_output
expert
2:00remaining
What is the effect of combining caching and CDN plugins on WordPress site performance?

Consider a WordPress site using both a caching plugin and a CDN plugin. What is the combined effect on site speed?

AThe caching plugin serves static pages quickly from the server, while the CDN delivers these cached files from servers closer to visitors, reducing load time globally.
BThe caching plugin compresses images, and the CDN disables caching to ensure fresh content.
CThe CDN replaces the caching plugin by storing database queries, making caching unnecessary.
DThe caching plugin slows down the site because it conflicts with the CDN's file delivery.
Attempts:
2 left
πŸ’‘ Hint

Think about how caching and CDNs work together to serve content faster.