schema property “review” too long

#1019059
  • Hello,
    I have a WP woocommerce web site with free rank math plugin.
    I have WC products on which rank math automatically apply a default woocomerce schema. When I inspect the HTML source page of one of my products (https://florence-poirier.com/service/soin-energetique-spirits/), I noticed in the “rank-math-schema” generated HTML code that the automatically generated “review” schema property contains ALL of the 42 product’s reviews ! With all these review descriptions, that increase a lot the page size and impact the page loading time.
    In my product page, all the reviews are displayed to customers using pagination to reduce the impact on size and loading time.
    How can I avoid to generate ALL the WC product reviews in the “review” schema property ?
    The support bot could not answer to this question

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    The review schema is inside a script that is added automatically and is unique for each page/post, defining its schema markup.

    We wouldn’t recommend minifying this, as it is usually dynamic according to any changes made to your pages. Instead, consider including it in your meta tags for search engines to understand the reviews from your site.

    Looking forward to helping you.

    Ok but the schema generation is not optimised of the target users. If I have hundred, thousands reviews, it would slow down the response time for all users ! Especially for mobile users with low bandwith…
    You could consider offering a way to choose which WC property to be generated.

    So, I now consider deactivating the RankMath WC schema to priorize response time for final user above Google indexation…

    Is there a way by coding a PHP addAction/addFilter to filter the generated schema property ?

    “only” 42 reviews add 42Ko to the page size (total of 216Ko) ! It’s close to 20%.
    And it will increase in time…

    Hello,

    If you don’t want to use the Review schema on your page, then you can try to add the following filter on your website to remove this.

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
            if($entity['aggregateRating']) {
                    unset($entity['aggregateRating']);
                    unset($entity['review']);
            }
            return $entity;
    });

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this ticket.