[Feature]: Preparation for WordPress org release #57
[Feature]: Preparation for WordPress org release #57theMasudRana wants to merge 40 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.
| "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.
There was a problem hiding this comment.
@gagan0123, Sorry about that — we haven’t tested this plugin on PHP 7.4, and declaring 7.4 support was my mistake.
We’re keeping the minimum required PHP version at 8.2 (the lowest version currently validated), and our CI is also configured for PHP 8.2.
There was a problem hiding this comment.
Got it, checked that the readme.txt was updated for the same, but README.md is still saying 7.4 as min requirement
Ref: https://github.com/rtCamp/carousel-kit/blob/feat/prepair-for-wp-org/README.md#requirements
There was a problem hiding this comment.
Thanks for catching that, @gagan0123,
I've updated the README.md as well to reflect PHP 8.2 as the minimum required version.
up1512001
left a comment
There was a problem hiding this comment.
@theMasudRana Added few suggestions.
carousel-kit.php
Outdated
| @@ -8,14 +8,18 @@ | |||
| * Author: rtCamp | |||
| * Author URI: https://rtcamp.com | |||
| * Contributors: iamdanih17, immasud | |||
There was a problem hiding this comment.
Added rtcamp as a contributor.
carousel-kit.php
Outdated
| 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
There was a problem hiding this comment.
Thanks for the suggestion — updated this file to use a namespace and moved all plugin constant definitions into a dedicated constants() function (called during bootstrap). Behavior remains the same, but initialization is now cleaner and more consistent with our standards.
carousel-kit.php
Outdated
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.
package.json
Outdated
There was a problem hiding this comment.
I suggest to remove version from composer & package file to avoid maintaining it on multiple places.
There was a problem hiding this comment.
Removed the version from package.json and package-lock.json
Plugin version is not added in the composer.json file.
| 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
There was a problem hiding this comment.
The CHANGELOG.md file has been in the branch for more than a week, why you were not able to find it?
There was a problem hiding this comment.
@gagan0123 I was just saying for public plugins in readme.txt we should only include 2-3 latest changelog and at end mention our CHANGELOG.md file so that readme.txt don't get too big and it will save copy-paste work.
readme.txt
Outdated
| * 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
There was a problem hiding this comment.
Removed the upgrade notice section because we have not published any breaking changes, as per recommendation we don't need this.
…d changelog entries for fixes
composer.json
Outdated
| "test": "phpunit", | ||
| "test:unit": "phpunit --testsuite unit", | ||
| "test:coverage": "phpunit --coverage-html tests/_output/coverage" | ||
| "format": "vendor/bin/phpcbf", |
There was a problem hiding this comment.
The vendor/bin/ prefix was added to ensure the scripts could resolve the correct binary paths explicitly. However, this was unnecessary — Composer automatically prepends vendor/bin to the PATH when executing scripts, so bare binary names work just fine. It has been removed to keep the scripts cleaner.
| @@ -21,15 +21,14 @@ parameters: | |||
| - tests/phpstan/constants.php | |||
| paths: | |||
There was a problem hiding this comment.
@up1512001 Added the uninstall.php as recommended.
https://github.com/rtCamp/carousel-kit/blob/22cb27cab704d3531e61b2c7351899470fd973f5/uninstall.php
…ION, and readme.txt
… svgo and immutable versions
up1512001
left a comment
There was a problem hiding this comment.
@theMasudRana few nits, then good to go from my end 😄
docs/INSTALLATION.md
Outdated
There was a problem hiding this comment.
Link seems to be incorrect https://github.com/rtCamp/carousel-system-interactivity-api/releases
There was a problem hiding this comment.
Updated the link.
package.json
Outdated
| "@types/wordpress__block-editor": "15.0.0", | ||
| "@types/wordpress__blocks": "12.5.18", | ||
| "@wordpress/scripts": "^31.2.0", | ||
| "@wordpress/scripts": "31.5.0", |
There was a problem hiding this comment.
any reason to version lock & not allowing minor/patch version updates??
was anything breaking?
There was a problem hiding this comment.
Good catch! No, nothing was breaking - it was just inconsistent.
Updated packages to use ^ for semver ranges now.
phpstan.neon.dist
Outdated
| - vendor/ | ||
| analyseAndScan: | ||
| - node_modules (?) | ||
| - node_modules/ |
There was a problem hiding this comment.
node_modules might not always exists so would prefer ? instead of /
There was a problem hiding this comment.
Added (?) for node_modules


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