|
1 | 1 | # Reply to WordPress.org Plugin Review |
2 | 2 |
|
3 | 3 | **To:** plugins@wordpress.org |
4 | | -**Subject:** Re: [WordPress Plugin Directory] Codeideal Open Fields - Review Response |
| 4 | +**Subject:** Re: [WordPress Plugin Directory] Codeideal Open Fields - Review Response (v0.3.0) |
5 | 5 |
|
6 | 6 | --- |
7 | 7 |
|
8 | 8 | Hi, |
9 | 9 |
|
10 | | -Thank you for the review. I've addressed every item below. |
| 10 | +Thank you for the thorough review — I've gone through every point and addressed them all in this update (v0.3.0). |
11 | 11 |
|
12 | | -**1. Plugin Name / Trademark** |
| 12 | +**1. Compressed/Generated Code — Source Documentation** |
13 | 13 |
|
14 | | -The plugin has been rebranded to **"Codeideal Open Fields"** — prefixed with our brand name. All references to competitor trademarks (ACF, Advanced Custom Fields, Meta Box) have been removed from the plugin name, description, readme tags, FAQ, and all internal code comments throughout the entire codebase. |
| 14 | +Added a "Source Code & Build Instructions" section to `readme.txt`. The compiled admin JS (`assets/admin/js/admin.js`) is built from React/TypeScript source included in our public GitHub repository (`admin/src/`). Build steps and source file locations are now documented in the readme. |
15 | 15 |
|
16 | | -**2. Slug** |
| 16 | +**2. REST API `permission_callback` Issues** |
17 | 17 |
|
18 | | -The current slug is `codeideal-open-fields`, which matches our text domain and all internal references. Could you please confirm or assign this slug? |
| 18 | +- `/search/users` — now requires `list_users` instead of `edit_posts` |
| 19 | +- `/options/roles` — now requires `list_users` instead of `edit_posts` |
| 20 | +- Added a dedicated `check_list_users_permission()` method for these user-data endpoints |
19 | 21 |
|
20 | | -**3. Contributor / Ownership** |
| 22 | +All other endpoints already used `check_admin_permission()` (`manage_options`) — no changes needed there. |
21 | 23 |
|
22 | | -The readme.txt contributor has been corrected to `shayancode`, matching my WordPress.org username. I am the owner and sole developer of codeideal.com — you can verify this via the Author URI in the plugin header (`https://codeideal.com`). |
| 24 | +**3. Nonce & Capability Checks** |
23 | 25 |
|
24 | | -**4. Code Quality Fixes** |
| 26 | +Added `current_user_can( 'edit_term', $term_id )` at the top of `save_taxonomy_fields()`. The post and user save handlers already had proper capability checks — I verified all three are now covered: |
25 | 27 |
|
26 | | -- Replaced all `json_encode()` calls with `wp_json_encode()` |
27 | | -- Added `phpcs:ignore` annotation with justification for the `$_GET['activate-multi']` check in the activation redirect (standard WordPress pattern, no data processing) |
28 | | -- Fixed unescaped output variables in `repeater.php` field renderer |
29 | | -- Fixed double-escaping in two field renderers (post-object, user) |
30 | | -- Removed `Update URI` header (not allowed on wordpress.org-hosted plugins) |
31 | | -- Fixed a bug in `uninstall.php` where meta cleanup queries used an incorrect prefix pattern |
| 28 | +- `save_post()` → `current_user_can( 'edit_post', $post_id )` |
| 29 | +- `save_taxonomy_fields()` → `current_user_can( 'edit_term', $term_id )` *(added)* |
| 30 | +- `save_user_fields()` → `current_user_can( 'edit_user', $user_id )` |
32 | 31 |
|
33 | | -**5. Security** |
| 32 | +**4. Escaped Output** |
34 | 33 |
|
35 | | -All `$_POST` data access is behind nonce verification (`wp_verify_nonce`), capability checks (`current_user_can`), and sanitized with `sanitize_text_field()`, `wp_unslash()`, `absint()`, or type-specific sanitization. The REST API uses `permission_callback` on every route with `manage_options` or `edit_posts` capability checks and `$wpdb->prepare()` for all queries. |
| 34 | +Wrapped all bare `echo` ternary expressions in `esc_attr()` across the field renderer templates (`image.php`, `file.php`, `gallery.php`, `repeater.php`, `taxonomy.php`). The `$data_string` and `$atts` echo patterns were already pre-escaped via `esc_attr()` during construction — each has a `phpcs:ignore` annotation with justification explaining so. I verified these are correct. |
36 | 35 |
|
37 | | -**6. load_plugin_textdomain** |
| 36 | +**5. Prefix Length** |
38 | 37 |
|
39 | | -Not called — the plugin relies on WordPress 4.6+ automatic translation loading from translate.wordpress.org, as recommended. |
| 38 | +Renamed the entire prefix from `cof` (3 chars) to `cofld` (5 chars). This touched every PHP file, CSS file, JS file, and the React source: |
40 | 39 |
|
41 | | -Please let me know if anything else is needed. |
| 40 | +- Constants: `COF_*` → `COFLD_*` |
| 41 | +- Classes: `COF_*` → `COFLD_*` |
| 42 | +- Functions: `cof_*()` → `cofld_*()` |
| 43 | +- CSS classes: `.cof-*` → `.cofld-*` |
| 44 | +- JS variables: `cofConfig` → `cofldConfig`, `cofMetaBox` → `cofldMetaBox`, etc. |
| 45 | +- DB tables: `cof_fieldsets` → `cofld_fieldsets`, `cof_fields` → `cofld_fields`, `cof_locations` → `cofld_locations` |
| 46 | +- File names: `class-cof-*.php` → `class-cofld-*.php` |
42 | 47 |
|
43 | | -Best regards, |
44 | | -Shayan Moradi |
45 | | -https://codeideal.com |
| 48 | +Ran a final automated grep across the entire built ZIP — zero remaining old-prefix references. |
| 49 | + |
| 50 | +Please let me know if anything else needs attention. |
| 51 | + |
| 52 | +Best regards |
| 53 | +Shayan |
0 commit comments