Skip to content

Conversation

@swissspidy
Copy link
Collaborator

In the 2025-03-01 dataset, ~54% of all WordPress sites use one of these slider/carousel libraries.

The list of plugins/libraries is based on some manual research and is not meant to be exhaustive.

This is relevant for things like https://core.trac.wordpress.org/ticket/63251

I am sharing these numbers in an upcoming blog post and need to store the query somewhere, so here I am :)

@swissspidy swissspidy requested a review from felixarntz April 22, 2025 15:26
@swissspidy swissspidy force-pushed the add/slider-usage-query branch from ac80549 to d4b9237 Compare April 22, 2025 15:35
Copy link
Collaborator

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swissspidy Looks good, just an optional recommendation.

Comment on lines +33 to +56
CREATE TEMPORARY FUNCTION
HAS_SLIDER(technologies ARRAY<STRUCT<technology STRING,
categories ARRAY<STRING>,
info ARRAY<STRING>>>)
RETURNS BOOL AS (
EXISTS(
SELECT
*
FROM
UNNEST(technologies) AS technology
WHERE
technology.technology IN (
'FlexSlider',
'Flickity',
'Master Slider',
'MetaSlider',
'OWL Carousel',
'Slick',
'Slider Revolution',
'Smart Slider 3',
'Swiper'
)
)
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty much the same as HAS_TECHNOLOGY, except that it looks for one of multiple technologies.

You could get rid of the two functions in favor of a tiny change to make HAS_TECHNOLOGY expect an array of strings instead of a single string. Then you can pass all the technologies to the function.

You could keep HAS_SLIDER() if you think it has value but have it call HAS_TECHNOLOGIES.

Not a big deal, but avoids duplicate implementation of almost the same piece of query.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I thought about that but figured it doesn't really matter for a one off query.

@swissspidy swissspidy merged commit feb585f into main Apr 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants