linkedin-skill-assessments-quizzes

WordPress

Q1. In WordPress, what is the Loop used to do?

Q2. Who owns the trademark for WordPress and WordCamp names and logos?

Q3. What is the name of the open-source project that serves as a bug tracker and project management tool for WordPress?

Q4. The REST API is a simple way to get data in and out of WordPress over HTTP. Applications using the REST API should be written in which programming language?

Q5. How many minutes does it take to install WordPress according to the “Famous X-Minute Installation” instructions on WordPress.org?

Q6. In WordPress, what is true of plugins?

Q7. Akismet is a plugin that comes automatically installed with WordPress. What does it do?

Q8. What would you do to improve your site’s performance?

Q9. The REST API utilizes which data format?

Q10. What color is the paragraph nested within the div?

<head>
    <style>
        body { color: black; }

        p { color: blue; }

        div { color: green; }

        p { color: red; }
    </style>
</head>
<body>
    <div>
        <p>This is a paragraph inside a div.</p>
    </div>
</body>
</html>

Q11. Theme developers can take advantage of the

izer API to give users a way to manipulate basic theme settings. The Customizer API is object-oriented and provides four main objects. What are they?

Q12. Which WordPress setting would you use to make page URLs look like http://example.com/my-page/ instead of the default http://example.com/?p=21/?

Q13. In WordPress, what is the block editor used for?

Q14. Which of the following file types is NOT involved in translating WordPress?

Q15. What is the default priority for an action hook or filter?

Q16. What is the primary difference between template tags prefaced with the versus get_the?

Q17. WP_Query is the WordPress query class that is used to fetch posts from the database. How would you create a new instance of this class?

Q18. What is a user role that is unique to WordPress Multisite?

Q19. Within the Editor, blocks are rendered as JavaScript. How are blocks rendered on the front end of a site?

Q20. Which of these is NOT a part of the internationalization and localization process?

Q21. The REST API provides public data, which is accessible to any client anonymously, as well as private data available only after authentication. How could you ensure no one can anonymously access site data via the REST API?

Q22. Which of these snippets represents a wrapper that calls jQuery safely and doesn’t require repetitive use of the word “jQuery”?

$.ready(function () {
  // do stuff
});
(function ($) {
  // do stuff
})(jQuery);
$(function () {
  // do stuff
});
jQuery(function ($) {
  // do stuff
});

Q23. What is the correct order of parameters for the add_action() function?

Q24. You have a search bar on your site. You would like to use a <label> to make the word “Search” visible to screen readers, but you don’t want to display the word “Search” on the screen. How can you accomplish this?

Q25. You might see this code in a WordPress plugin. What does it do?

if ( ! defined( 'ABSPATH' ) ) {
   die;
}

Reference

Q26. Which is the best practice for working with WordPress CSS?

Q27. WordPress is translated, at least partially, in more than 200 locales. If you wanted to help translate WordPress into other languages, which contributor group would you join?

Q28. What is the difference between an action and a filter?

Q29. If you activate or update a plugin and it breaks your site so that you cannot manage it via wp-admin, how can you disable the plugin?

Q30. The WordPress REST API is designed to receive and respond to particular types of requests using basic HTML methods. For example, a request to upload a PHP file into a particular folder on a server might look like the code POST /folder/_file.php. Based on this code, what would you call /folder/_file.php (in REST API terms)?

Q31. Which WP-CLI command would you use to manage the capabilities of a user role?

Q32. What technique would you use to secure data before rendering it to a user?

Q33. If your WordPress site is seriously compromised, what is the best course of action to return your site to good health?

Explanation: It’s not the cheapest, but it’s the most reliable. Restoring the backup might not help if you have backdoor scripts installed outside of WP directory.

Q34. If you wanted to register a custom post type, which hook would you use?

Q35. What is the role of a WordPress theme?

Q36. What is the core mission of WordPress?

Reference

Q37. Which of the following is NOT a suggested security improvement for your WordPress website?

Explanation: Communicating with WordPress.org is needed for detecting new versions.

Q38. How can you add a custom script that needs to run only on the contact page of a site? The slug of the page is contact.

get_header( '<script src="/my-script.js"></script>' );
add_action( 'wp_enqueue_scripts', 'load_scripts' );

function load_scripts() {
    if ( is_page( 'contact' ) ) {
    echo '<script src="/my-script.js"></script>';
    }
}
add_action( 'wp_enqueue_scripts', 'load_scripts' );
    function load_scripts() {
        if ( is_page( 'contact' ) ) {
        wp_enqueue_script( 'script', get_template_directory_uri() . '/script.js' );
        }
    }
<head>
  <script src="/my-script.js"></script>
</head>

Q39. Where can you find the official WordPress documentation and usage guide?

Q40. How would you use CSS to ensure your theme was mobile responsive?

Q41. The Block API enables developers to register custom blocks in themes or plugins. How would you register a custom block?

Q42. Which software development principle, often used in WordPress, aims to reduce the repetition of code?

DRY(Don't Repeat Yourself)

Q43. In a standard template file, how often does the WordPress Loop run?

Q44. Which is NOT a suggested performance improvement for your WordPress website?

Explanation: New versions usually come with speed improvements. Inactivating plugins improves performance. By exclusion, it’s UTF8.

Q45. On a regular WordPress install, what is the difference between transients and the object cache?

Q46. You can harden your WordPress site security by adding __ to your wp-config.php file?

Reference

Q47. According to WordPress PHP coding standards for inline comments, how would you write a single-line comment in a PHP document?

Q49. What is the process of marking the code you write so that it is ready for translation?

Explanation: Localization and translation are synonyms for submitting language-specific translations. GlotPress is just a WordPress plugin.

Q50. In your wp-config.php file, you’ve added the following line of code. What does it do?

define( 'DISALLOW_FILE_EDIT', true );

More WordPress Security: Disallow File Edit Setting In WordPress. Setting all files to read-only would make auto-updates impossible.

Q52. In which of the following ways might you contribute to the WordPress community by testing?

Q53. WordPress is an open-source software licensed under the GPL. This means that __.

Q54. Review the HTML on line 1. The goal of the PHP on line 2 is to extract the field value and assign it to a variable prior to inserting into the database. What is wrong with this PHP code?

<input type="text" id="title" name="title" />
$title = $_POST[ 'title' ];

Ref

Q55. Which of this CSS classs naming convention is correct according to WordPress CSS Coding Standards?

Reference - Avoid Underscores

Q56. Which folder in a WordPress install is not affected by an automatic WordPress update?

Q57. What are transients?

Explanation: Transients

Q58. If you wanted to debug some JavaScript, which method would you use to display data in your browser console?

Q59. On a webpage, there are frequently navigation links, a search bar, or other elements that appear before the main content. For keyboard and screen reader users, it can be frustrating to get to the main content of a page because they have to tab through all these elements on every new page load. What can you add to a site to fix this?

Q60. What user role would you assign to someone so they can write and publish only their posts and no one else’s?

Explanation: Summary of Roles

Q61. When should you edit core WordPress files?

Explanation: It is not recommended to change WordPress core files other than wp-config.php. Editing Files Offline

Q62. Which Wordpress conditional would you use to determine if you were on a single page?

Reference

Q63. Wordpress core and many plugins store data in the database in a special format as represented by the sample below. What format is this called?

a:2:{i:0;s:27:"ari-adminer/ari-adminer.php";i:1;s:30:"atomic-blocks/atomicblocks.php";}

Reference

Q64. What is this code sample an example of?

<?php
if ( have_posts() ) : while ( have_posts() ) : the_post();
        the_content();
endwhile;
else :
        _e( 'Sorry, no posts matched your criteria.', 'textdomain' );
endif;

Q65. Which of these are the minimum files required to make a child theme?

Reference

Q66. In the WordPress template hierarchy, which file could not be used to display an archive?

Reference

Q67. Why can’t you modify the query on a template page?

Reference

Q68. For the majority of modern themes, what is the standard method used to customize various details of site appearance and features, such as changing the site description or adding a logo and favicons?

Reference

Q69. How would you write a text string containing “Hello World!” in a way that makes it possible for someone else to translate the string into a different language?

Reference

Q70. Which of these are best practices in accessibility?

Q71. JavaScript variables can hold many data types. Which data type does the following variable represent?

var x = '16';

Reference

Q72. You would use a post instead of a page when the content is _.

Q73. The WordPress block editor contains a number of default blocks, including blocks for paragraphs, images, quotes, and shortcodes. Blocks are grouped into categories to help users browse and discover them. Which is not a category provided by WordPress Core?

Q74. What service is used to manage user profile photos across any WordPress site?

Q75. Which is not a benefit of DRY code?

Q76. Which of these does not impact your site speed?

Q77. Where do you configure global settings for comments on your WordPress site?

Q78. What can you not configure via wp-config.php?

Q79. When it comes to best practice for WordPress development, what is the preferred method for adding a custom post type (CPT) to a site?

Reference

Q80. What is a way you can both harden your site’s security and improve how Google presents your site in search results?

Q81. Review the HTML on line 1. The goal of the PHP on line 2 is to extract the field value and assign it to a variable prior to inserting it into the database. What is wrong with this PHP code?

  1. <input type="text" id="title" name="title" />
  2. $title = $_POST[ 'title' ]

Q82. Which of these is not a part of the internationalization and localization process?

Q83. The REST API provides data, which is accessible to any client anonymously, as well as private data available only after authentication. How could you ensure that no one can anonymously access site data via the REST API?

Q84. Which of these refers to a WordPress security token that is used to verify that a request was made by the right person or client?

Reference

Q85. Which of these refers to a WordPress security token that is used to verify that a request was made by the right person or client?

Reference