[Feature]: Preparation for WordPress org release #57
[Feature]: Preparation for WordPress org release #57theMasudRana wants to merge 14 commits intodevelopfrom
Conversation
…s.org distribution
… and bugs metadata
…or plugin structure
… feat/prepair-for-wp-org
… feat/prepair-for-wp-org
…t.php for direct access protection
There was a problem hiding this comment.
Pull request overview
Prepares the Carousel Kit plugin for a WordPress.org release by adding WP.org-required metadata/artifacts, localizing assets, and hardening direct access.
Changes:
- Adds WordPress.org packaging assets (readme.txt, .distignore) and localization template (POT) plus an npm script to generate it.
- Replaces externally-hosted placeholder images in example patterns with bundled local assets.
- Adds direct-access prevention and an
index.php“silence is golden” file.
Reviewed changes
Copilot reviewed 10 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| readme.txt | Adds WordPress.org readme metadata, description, screenshots, changelog. |
| package.json | Adds repository/bugs metadata and an i18n POT generation script. |
| languages/carousel-kit.pot | Adds translation template for strings. |
| index.php | Adds “silence is golden” index to prevent directory listing. |
| examples/patterns/logo-showcase.php | Switches pattern images from external placeholders to bundled SVGs. |
| examples/patterns/hero-carousel.php | Switches hero slides from external placeholders to bundled WEBPs. |
| examples/data/images/logo-placeholder-*.svg | Adds bundled placeholder logo SVG assets. |
| composer.json | Removes a production dependency from require. |
| composer.lock | Updates lockfile to reflect removed production dependency. |
| carousel-kit.php | Updates license header and adds direct access guard. |
| Makefile | Adjusts dist exclusions (README.md no longer excluded). |
| .distignore | Adds ignore rules for WordPress.org distribution packaging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| == Changelog == | ||
|
|
||
| = 1.0.2 = | ||
| * Fix: Demo pattern now shows 4 slides per view | ||
| * Fix: Replace PNG images with optimized WEBP format | ||
| * New: Setup wizard styles | ||
| * New: Slide appender and setup wizard | ||
|
|
There was a problem hiding this comment.
The readme changelog/upgrade notice stops at 1.0.2, but the plugin version is 1.0.3. Add a 1.0.3 entry (or update the current entries) so WordPress.org users can see what changed in the version being released.
package.json
Outdated
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/rtCamp/carousel-kit" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/rtCamp/carousel-kit/issues" | ||
| }, |
There was a problem hiding this comment.
This hunk introduces tab-indented properties (repository, bugs) while the rest of package.json uses spaces. Please normalize indentation so automated formatters/linters and future diffs remain consistent.
| "repository": { | |
| "type": "git", | |
| "url": "https://github.com/rtCamp/carousel-kit" | |
| }, | |
| "bugs": { | |
| "url": "https://github.com/rtCamp/carousel-kit/issues" | |
| }, | |
| "repository": { | |
| "type": "git", | |
| "url": "https://github.com/rtCamp/carousel-kit" | |
| }, | |
| "bugs": { | |
| "url": "https://github.com/rtCamp/carousel-kit/issues" | |
| }, |
There was a problem hiding this comment.
Use consistent formatting, stick with either spaces or tabs, not both in a single file.
In the .editorconfig of the plugin, its specified that 2 spaces are to be used for indentation of json files, so stick with that or update the .editorconfig and update all json files to follow that.
There was a problem hiding this comment.
Formatted the file with 2 spaces as per .editorconfig
| "require": { | ||
| "php": "^8.2", | ||
| "scrivo/highlight.php": "^9.18" | ||
| "php": "^8.2" | ||
| }, |
There was a problem hiding this comment.
composer.json requires PHP ^8.2, but the plugin header (carousel-kit.php) and readme.txt both declare Requires PHP: 7.4. For WordPress.org, these should be aligned with the actual runtime requirement; either lower composer.json's PHP constraint/platform or bump the plugin/readme requirement to 8.2 if that's the real minimum.
There was a problem hiding this comment.
Have we tested this plugin with PHP 7.4?
If not, then whichever is the lowest version of PHP you've tested this plugin with, that should be the required PHP version.
readme.txt
Outdated
| Requires at least: 6.5 | ||
| Tested up to: 6.9 | ||
| Requires PHP: 7.4 | ||
| Stable tag: 1.0.2 |
There was a problem hiding this comment.
Stable tag is set to 1.0.2, but the plugin header and package.json both declare version 1.0.3 (and the POT header also says 1.0.3). For WordPress.org releases, the readme stable tag should match the released plugin version (or be trunk).
| Stable tag: 1.0.2 | |
| Stable tag: 1.0.3 |
There was a problem hiding this comment.
Updated the stable tag.
up1512001
left a comment
There was a problem hiding this comment.
@theMasudRana Added few suggestions.
| @@ -8,17 +8,21 @@ | |||
| * Author: rtCamp | |||
| * Author URI: https://rtcamp.com | |||
| * Contributors: iamdanih17, immasud | |||
| exit; // Exit if accessed directly. | ||
| } | ||
|
|
||
| define( 'CAROUSEL_KIT_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); |
There was a problem hiding this comment.
if possible wrap this all const into function and add namespace to this file.
reference: https://github.com/rtCamp/OneUpdate/blob/e5920c452fffc70a2d7d922a2c80d44ff065a216/oneupdate.php#L29
| define( 'CAROUSEL_KIT_BUILD_PATH', CAROUSEL_KIT_PATH . '/build' ); | ||
| define( 'CAROUSEL_KIT_BUILD_URL', CAROUSEL_KIT_URL . '/build' ); | ||
|
|
||
| require_once CAROUSEL_KIT_PATH . '/vendor/autoload.php'; |
There was a problem hiding this comment.
add file exist check if someone downloads from GH then activating this plugin should give admin notice instead of fatal error.
| @@ -1,3 +1,3 @@ | |||
| { | |||
| "name": "carousel-kit", | |||
| "version": "1.0.3", | |||
There was a problem hiding this comment.
I suggest to remove version from composer & package file to avoid maintaining it on multiple places.
| 3. Query Loop integration for dynamic content | ||
| 4. Frontend carousel with autoplay | ||
|
|
||
| == Changelog == |
There was a problem hiding this comment.
in plugin root we should have CHANGELOG.md https://github.com/rtCamp/godam/blob/main/CHANGELOG.md
and add just reference of that be adding at latest 2 release info
| * Query Loop integration | ||
| * RTL and accessibility support | ||
|
|
||
| == Upgrade Notice == |
There was a problem hiding this comment.
upgrade notice should be for latest plugin version and if its doing any breaking changes.
https://wordpress.org/plugins/readme.txt#:~:text=%3D%3D%20Upgrade%20Notice%20%3D%3D
https://wp-kama.com/handbook/plugin/wordpress-org/readme-txt#upgrade-notice

Description: Prepare the plugin for WordPress.org release
Issue: https://github.com/rtCamp/support/issues/462#issuecomment-3982065178