Trustpilot Reviews for WordPress
A WordPress plugin that syncs Trustpilot reviews into the site and shows visitors the ones that match the page they are on, not one generic widget.
Releases on GitHub↗A client wanted their Trustpilot reviews on their product pages. Not the same reviews everywhere, but the ones that talk about the product you're looking at. So I wrote a WordPress plugin that pulls their reviews into the site's own database and lets them pick which ones show up where.
Why I built it
The client's site is Danish, and they wanted more control over which reviews appear on which page. The main thing was a carousel per product page, filtered by keyword, so a page about one product shows reviews that mention it.
The score badge, the star filters and the language toggle came later. I added a few more custom data setups now that it was already a plugin. Rendering the reviews as plain HTML on the page is better for SEO too.

How it works
WP-Cron runs a sync on a schedule you pick (hourly up to weekly). It gets an OAuth2 token from Trustpilot, pages through the reviews endpoint and upserts every review into a custom wp_tp_reviews table. It never truncates, so a failed sync can't wipe what's already there.
In the admin you create Review Sets: a slug, some keywords, a minimum star rating and a limit. Each one becomes a shortcode like [tp_reviews id="standing-desk"] that you drop into any page, including Elementor's Shortcode widget. The page never calls Trustpilot. It reads the local table and caches the result until the next sync or until someone edits the set.
The keyword filter itself is small. Each keyword becomes a LIKE on the review's title and body, and the keywords are OR'ed together.
1foreach ( $kw_list as $kw ) {2 $like = '%' . $wpdb->esc_like( $kw ) . '%';3 $kw_clauses[] = '(body LIKE %s OR title LIKE %s)';4 $params[] = $like;5 $params[] = $like;6}7$where[] = '(' . implode( ' OR ', $kw_clauses ) . ')';
Looking like Trustpilot on purpose
Honestly, it was pretty straight ahead. The part that took care was following Trustpilot's guidelines, so the widgets look like theirs and not like something homemade or fake.
And I didn't want it to look like I was copying their style to trick anyone either. So it goes the other way: it's their real data, credited the way they ask. Every carousel shows the TrustScore, the total review count, the Trustpilot logo and a link to the actual profile. Each card links to the review on Trustpilot. If a Review Set only shows 4 and 5 stars, the widget says so in plain text ("Showing our 4 and 5-star reviews"), so a filtered carousel doesn't pass for the full picture.
The client's site isn't shown here. Every screenshot and the video come from a local test install with a fictional shop and fictional reviews, set up only for this page.
Open source and self-updating
I made it open source so anyone can use it, and that made self-updating worth building. New versions go out as GitHub Releases, and the plugin uses Plugin Update Checker to spot them, so they show up under Plugins like any other update. No uploading zips by hand.
One odd bug came out of that. As far as I remember, the plugin's name clashed with another plugin on wordpress.org, and WordPress started offering to "update" mine to that one. The fix was the Update URI header, which tells WordPress where this plugin's updates actually come from.
The language toggle has a similar story. The client's site is Danish, but most people who'd grab an open-source plugin aren't, so every string has an English and a Danish version, and English is the default.
Where it is now
It's parked for now. If the client needs more, I'll pick it back up. I might put it on the wordpress.org plugin directory at some point.