=== PlaceCore Reviews ===
Contributors: virendrasingh06
Tags: google reviews, google places, reviews, ratings, social proof
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display Google reviews on your WordPress site with a block, widget, or shortcode. Lightweight, cached, and built for performance.

== Description ==

PlaceCore Reviews connects your WordPress site to the Google Places API and displays your business rating and recent customer reviews. It is built for speed and reliability: all API requests run server-side, responses are cached in WordPress transients, and the front end only outputs escaped, validated HTML.

**This plugin is not affiliated with, endorsed by, or sponsored by Google LLC.**

**Three ways to display reviews:**

* **Gutenberg block** — "PlaceCore Reviews" block with inspector controls for Place ID and review count.
* **Classic widget** — "PlaceCore Reviews" widget for any sidebar or footer.
* **Shortcode** — `[placecore]` or `[placecore count="3" place_id="YOUR_ID"]`.

**Features**

* **Server-side API calls.** Your Google Places API key never appears in the browser.
* **Cached responses.** Reviews are stored in WordPress transients for 1 hour by default. No repeated API calls on every page load.
* **Lightweight.** No jQuery dependency. Plain CSS and JavaScript.
* **Google-compliant.** Displays author names, avatars, and links back to Google Maps as required by the Google Places API attribution guidelines.

== External services ==

This plugin connects to the Google Places API to retrieve business ratings and customer reviews.

**What is sent:** Your Google Places API key (as an authorization header), the Place ID you configure in the settings, and the field mask requesting ratings and reviews.

**When it is sent:** Only when the plugin needs to fetch or refresh reviews. Responses are cached in WordPress transients for 1 hour by default, so the API is not called on every page load.

**Who receives it:** Google LLC. Requests are made server-side from your WordPress installation. No visitor data or personal information is sent.

**Google Places API terms and policies:**
* Terms of Service: https://cloud.google.com/maps-platform/terms
* Privacy Policy: https://policies.google.com/privacy
* Google APIs Terms of Service: https://developers.google.com/terms

== Installation ==

1. Upload the `placecore-reviews` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **PlaceCore Reviews** in the admin sidebar and enter your Google Places API key.
4. Enter your Google Place ID (find it with Google's Place ID Finder).
5. Save changes.
6. Add the block, widget, or shortcode to any post, page, or sidebar.

== Frequently Asked Questions ==

= Where do I get a Google Places API key? =

Go to the Google Cloud Console, enable the Places API, create an API key, and attach a billing account. Google offers a free tier.

= How do I find my Place ID? =

Use Google's Place ID Finder tool. Paste the Place ID into the PlaceCore Reviews settings page.

= Will my API key be visible to visitors? =

No. All API requests are made server-side using the WordPress HTTP API. Your API key is stored in the WordPress options table and is never sent to the browser.

= How long are reviews cached? =

By default, reviews are cached for 1 hour (3600 seconds). You can change this in the settings page, from 60 seconds up to 1 week.

= How many reviews can I display? =

Google returns a maximum of 5 reviews per Place ID. This is a Google API limit, not a plugin limitation.

= What happens if Google is unreachable? =

Visitors see nothing. Administrators (users with the `manage_options` capability) see an error message on the page so they can diagnose the problem.

== Screenshots ==

1. PlaceCore Reviews settings page.
2. The block in the Gutenberg editor.
3. The shortcode rendered on the front end.
4. The widget in a theme sidebar.

== Changelog ==

= 1.0.2 =
* Improved plugin description to remove comparisons with other plugins.
* Reduced tags to the 5 most relevant.
* Added disclosure of the Google Places API as an external service.
* Removed the unnecessary load_plugin_textdomain call.

= 1.0.1 =
* Fix: added missing Description, Version, and License headers to the main plugin file.
= 1.0.0 =
* Initial release.
* Gutenberg block, classic widget, and shortcode.
* Server-side Google Places API integration.
* Transient caching with configurable TTL.
* Admin-only error visibility for troubleshooting.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
