Lubinik Learning

Training mode

WordPress Advanced Interview

Time remaining:

0 / 60 answered

  1. 1. When is a server-side render_callback particularly useful for a block?

    When is a server-side render_callback particularly useful for a block?
    Hint

    Consider a latest-posts style block.

  2. 2. Which wp_enqueue_script() practices are correct?

    Select all correct answers.

    Which wp_enqueue_script() practices are correct?
    Hint

    Dependencies and versioning are part of the registration contract.

  3. 3. Why do plugin PHP files often begin with an ABSPATH guard?

    Why do plugin PHP files often begin with an ABSPATH guard?
    Hint

    ABSPATH is defined by WordPress.

  4. 4. What should a plugin do with its recurring events on deactivation?

    What should a plugin do with its recurring events on deactivation?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  5. 5. When is one structured array option preferable to many scalar options?

    When is one structured array option preferable to many scalar options?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  6. 6. Why is a valid nonce not enough to authorize a change?

    Why is a valid nonce not enough to authorize a change?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  7. 7. When is do_action_ref_array() useful?

    When is do_action_ref_array() useful?
    Hint

    Compare it with call_user_func_array().

  8. 8. What does relation control in a WP_Query meta_query?

    The query contains more than one metadata condition.

    What does relation control in a WP_Query meta_query?
    Hint

    Think of boolean logic between clauses.

  9. 9. What does the supports argument define?

    What does the supports argument define?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  10. 10. What does update_post_meta() do when the meta key does not yet exist?

    What does update_post_meta() do when the meta key does not yet exist?
    Hint

    The function supports both creation and update.

  11. 11. On which hook should custom REST API routes be registered?

    On which hook should custom REST API routes be registered?
    Hint

    The hook is dedicated to REST route registration.

  12. 12. What is the hard part of caching a database query in a transient?

    What is the hard part of caching a database query in a transient?
    Hint

    Fast stale data may still be wrong.

  13. 13. Are the parent and child theme functions.php files merged like CSS?

    Are the parent and child theme functions.php files merged like CSS?
    Hint

    A child functions.php does not replace its parent counterpart.

  14. 14. When can no_found_rows improve a WP_Query?

    When can no_found_rows improve a WP_Query?
    Hint

    Do you need max_num_pages?

  15. 15. Critical records exist only in a transient. What is the design flaw?

    Critical records exist only in a transient. What is the design flaw?
    Hint

    Choose the solution with the clearest boundary and safest lifecycle behavior.

  16. 16. When should a plugin normally flush rewrite rules for a new CPT?

    Choose the approach that avoids unnecessary work on normal requests.

    When should a plugin normally flush rewrite rules for a new CPT?
    Hint

    Flushing is expensive and registration must happen first.

  17. 17. Why is cache invalidation important?

    Why is cache invalidation important?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  18. 18. What commonly causes a static block validation error?

    What commonly causes a static block validation error?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  19. 19. How does hook priority affect callbacks attached to the same hook?

    Assume all callbacks are valid and registered.

    How does hook priority affect callbacks attached to the same hook?
    Hint

    Compare numeric priority values.

  20. 20. What does a WordPress nonce primarily verify?

    What does a WordPress nonce primarily verify?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  21. 21. What is a benefit of checking object-level capabilities such as edit_post with an object ID?

    What is a benefit of checking object-level capabilities such as edit_post with an object ID?
    Hint

    Authorization may depend on the object owner and status.

  22. 22. What does the public argument broadly influence?

    What does the public argument broadly influence?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  23. 23. Why register a metadata key?

    Why register a metadata key?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  24. 24. What does SCRIPT_DEBUG help test?

    What does SCRIPT_DEBUG help test?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  25. 25. Which WP_Query argument prevents sticky posts from being promoted?

    Which WP_Query argument prevents sticky posts from being promoted?
    Hint

    It does not exclude sticky posts from matching.

  26. 26. Which function prints a hidden nonce field for a form?

    Which function prints a hidden nonce field for a form?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  27. 27. What does did_action( $hook_name ) report?

    What does did_action( $hook_name ) report?
    Hint

    It is a counter, not a boolean-only check.

  28. 28. What can a REST route argument definition provide?

    What can a REST route argument definition provide?
    Hint

    Separate input shape from authorization.

  29. 29. Why is wp_unslash() commonly used before sanitizing request data?

    Why is wp_unslash() commonly used before sanitizing request data?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  30. 30. Which hook is normally used to register a Custom Post Type?

    You want to call register_post_type() at the point recommended by WordPress.

    Which hook is normally used to register a Custom Post Type?
    Hint

    This hook runs after WordPress has loaded but before the main request is processed.

  31. 31. What is dbDelta() designed to help with?

    What is dbDelta() designed to help with?
    Hint

    It is commonly used during versioned migrations.

  32. 32. Why pass a default value to get_option()?

    Why pass a default value to get_option()?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  33. 33. What does validation do?

    What does validation do?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  34. 34. What does the Interactivity API provide?

    What does the Interactivity API provide?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  35. 35. Why use a namespace such as my-plugin/v1?

    Why use a namespace such as my-plugin/v1?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  36. 36. Which function should authorize whether the current user may perform a WordPress operation?

    Choose the function intended for capability checks.

    Which function should authorize whether the current user may perform a WordPress operation?
    Hint

    Roles group capabilities, but code should generally check the required capability.

  37. 37. What format must a block name use?

    What format must a block name use?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  38. 38. What should follow a secondary WP_Query loop that called the_post()?

    What should follow a secondary WP_Query loop that called the_post()?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  39. 39. Which function returns the active theme directory, including the child theme when one is active?

    Which function returns the active theme directory, including the child theme when one is active?
    Hint

    Stylesheet and template can mean child and parent.

  40. 40. When should stored data be escaped?

    When should stored data be escaped?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  41. 41. What must code do after a transient cache miss?

    What must code do after a transient cache miss?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  42. 42. Which WP_Query argument filters posts by taxonomy terms?

    Which WP_Query argument filters posts by taxonomy terms?
    Hint

    Metadata and taxonomy data use different query arguments.

  43. 43. What makes a safe data migration?

    What makes a safe data migration?
    Hint

    Choose the solution with the clearest boundary and safest lifecycle behavior.

  44. 44. Why should SAVEQUERIES not remain enabled casually?

    Why should SAVEQUERIES not remain enabled casually?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  45. 45. Which order best describes a secure form handler?

    Which order best describes a secure form handler?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  46. 46. A loop runs a custom query for each of 200 posts. What should review investigate?

    A loop runs a custom query for each of 200 posts. What should review investigate?
    Hint

    Choose the solution with the clearest boundary and safest lifecycle behavior.

  47. 47. What does full-page caching avoid?

    What does full-page caching avoid?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  48. 48. Why must code treat get_transient() returning false carefully?

    Why must code treat get_transient() returning false carefully?
    Hint

    Avoid caching a literal false when you must distinguish it.

  49. 49. Which function sanitizes a lowercase machine-readable key?

    Which function sanitizes a lowercase machine-readable key?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  50. 50. Which hook supplies standard wrapper props in the editor?

    Which hook supplies standard wrapper props in the editor?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  51. 51. Which function registers a stylesheet for a specific block type?

    Which function registers a stylesheet for a specific block type?
    Hint

    It can avoid loading block CSS where it is not needed.

  52. 52. Why may a long-running cron job need a lock or idempotency guard?

    Why may a long-running cron job need a lock or idempotency guard?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  53. 53. A plugin deletes all data on deactivation. What is wrong?

    A plugin deletes all data on deactivation. What is wrong?
    Hint

    Choose the solution with the clearest boundary and safest lifecycle behavior.

  54. 54. What is the risk of too much autoloaded option data?

    What is the risk of too much autoloaded option data?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  55. 55. Which helper sends a JSON success response and terminates a WordPress AJAX request?

    Which helper sends a JSON success response and terminates a WordPress AJAX request?
    Hint

    WordPress provides paired success and error helpers.

  56. 56. What is a Custom Post Type?

    What is a Custom Post Type?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  57. 57. A REST route omits permission_callback because it is public. What should change?

    A REST route omits permission_callback because it is public. What should change?
    Hint

    Choose the solution with the clearest boundary and safest lifecycle behavior.

  58. 58. Why is total query count alone insufficient?

    Why is total query count alone insufficient?
    Hint

    Choose the answer that reflects current WordPress engineering practice.

  59. 59. Which function registers a taxonomy?

    Which function registers a taxonomy?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  60. 60. Why must classic themes call wp_head() and wp_footer()?

    Why must classic themes call wp_head() and wp_footer()?
    Hint

    Without them, enqueued assets may disappear.