Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions admin/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* @package performance-lab
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Adds the modules page to the Settings menu.
*
Expand Down
4 changes: 4 additions & 0 deletions load.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
* @package performance-lab
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

define( 'PERFLAB_VERSION', '2.5.0' );
define( 'PERFLAB_MAIN_FILE', __FILE__ );
define( 'PERFLAB_PLUGIN_DIR_PATH', plugin_dir_path( PERFLAB_MAIN_FILE ) );
Expand Down
4 changes: 4 additions & 0 deletions modules/database/audit-autoloaded-options/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Callback for autoloaded_options test.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/database/audit-autoloaded-options/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Adds test to site health.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/dominant-color-images/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Overloads wp_image_editors() to load the extended classes.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/dominant-color-images/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Add the dominant color metadata to the attachment.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/fetchpriority/can-load.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @package performance-lab
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

return static function() {
return ! function_exists( 'wp_get_loading_optimization_attributes' );
};
4 changes: 4 additions & 0 deletions modules/images/fetchpriority/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Filters an image tag in content to add the fetchpriority attribute if it is not lazy-loaded.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/webp-support/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Callback for webp_enabled test.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/webp-support/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Adds tests to site health.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/webp-uploads/can-load.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @package performance-lab
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

return static function() {
return ! function_exists( 'wp_image_use_alternate_mime_types' );
};
4 changes: 4 additions & 0 deletions modules/images/webp-uploads/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 1.0.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Returns an array with the list of valid mime types that a specific mime type can be converted into it,
* for example an image/jpeg can be converted into an image/webp.
Expand Down
4 changes: 4 additions & 0 deletions modules/images/webp-uploads/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Hook called by `wp_generate_attachment_metadata` to create the `sources` property for every image
* size, the sources' property would create a new image size with all the mime types specified in
Expand Down
4 changes: 4 additions & 0 deletions modules/images/webp-uploads/image-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 1.0.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Adds sources to metadata for an attachment.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/webp-uploads/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 1.0.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Updates the response for an attachment to include sources for additional mime types available the image.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/images/webp-uploads/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 1.6.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Registers setting for generating both JPEG and WebP versions for image uploads.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/js-and-css/audit-enqueued-assets/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 1.0.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Callback for enqueued_js_assets test.
*
Expand Down
4 changes: 4 additions & 0 deletions modules/js-and-css/audit-enqueued-assets/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 2.1.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Audit enqueued and printed scripts in is_front_page(). Ignore /wp-includes scripts.
*
Expand Down
4 changes: 4 additions & 0 deletions server-timing/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 1.8.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Registers the default Server-Timing metrics for before rendering the template.
*
Expand Down
4 changes: 4 additions & 0 deletions server-timing/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @since 1.8.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Provides access the Server-Timing API.
*
Expand Down
4 changes: 4 additions & 0 deletions server-timing/object-cache.copy.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
* @since 1.8.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

// Set constant to be able to later check for whether this file was loaded.
if ( ! defined( 'PERFLAB_OBJECT_CACHE_DROPIN_VERSION' ) ) {
define( 'PERFLAB_OBJECT_CACHE_DROPIN_VERSION', 2 );
Expand Down