0
0
Wordpressframework~10 mins

Security plugins in Wordpress - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to activate the WordPress security plugin.

Wordpress
activate_plugin('[1]');
Drag options to blanks, or click blank then click option'
Ahello-dolly/hello.php
Bcontact-form-7/wp-contact-form-7.php
Cakismet/akismet.php
Dwordfence/wordfence.php
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing plugins unrelated to security like Hello Dolly or Contact Form 7.
Using incorrect plugin file paths.
2fill in blank
medium

Complete the code to check if the Wordfence plugin is active.

Wordpress
if (is_plugin_active('[1]')) {
  // plugin is active
}
Drag options to blanks, or click blank then click option'
Awordfence/wordfence.php
Bclassic-editor/classic-editor.php
Cjetpack/jetpack.php
Dakismet/akismet.php
Attempts:
3 left
💡 Hint
Common Mistakes
Checking for unrelated plugins.
Using incorrect file paths.
3fill in blank
hard

Fix the error in the code to add a firewall rule using Wordfence API.

Wordpress
Wordfence::[1]('block_ip', $ip_address);
Drag options to blanks, or click blank then click option'
Aadd_firewall_rule
Badd_rule
Cblock_ip
DaddFirewallRule
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase instead of snake_case.
Using method names that don't exist.
4fill in blank
hard

Fill both blanks to create a security settings array for a plugin.

Wordpress
$settings = [
  'firewall_enabled' => [1],
  'scan_frequency' => '[2]'
];
Drag options to blanks, or click blank then click option'
Atrue
Bdaily
Cweekly
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Disabling firewall by setting false.
Choosing scan frequency that is too infrequent.
5fill in blank
hard

Fill all three blanks to configure a security plugin with user roles and notifications.

Wordpress
$config = [
  'allowed_roles' => [1],
  'notify_admin' => [2],
  'notification_email' => '[3]'
];
Drag options to blanks, or click blank then click option'
A['administrator', 'editor']
Btrue
Cadmin@example.com
D['subscriber', 'contributor']
Attempts:
3 left
💡 Hint
Common Mistakes
Allowing low privilege roles access.
Disabling notifications.
Using incorrect email format.