Merge BD Bookshelf (0.1.0), BD BookShelfHelper (2.0.0) and BD SimpleEmail
(2.0.0) into a single plugin released as Umbra Bookshelf 1.0.0, with the
BD Bookshelf theme left as a separate, unrenamed artifact.
Modules
includes/books/ catalogue, ISBN/ASIN, series, retail, ratings, shortcodes,
SEO, GDPR, scrapers, admin, CSV/post import
includes/library/ book post type + series taxonomy, pen names, data entry,
shortlinks, reviews, migrate
includes/email/ subscribers, newsletters, composition, sending
Renamed: plugin headers, text domains (all three -> umbra-bookshelf), classes
(BD_*/BDM_* -> Umbra_*), constants (-> UMBRA_BOOKSHELF_*), asset handles, JS
globals and admin slugs.
Deliberately not renamed -- persisted contract with live installs and with
published post content: table names, option keys, post meta keys, transients,
nonce actions, cron hooks, AJAX actions, shortcodes ([bd-book], [bd-books],
[bdm_signup]), post type `book`, taxonomy `series`, cookies and CSS classes.
BD_BookShelfHelper survives only as a class_alias for the unmodified theme.
Collisions resolved
* class-umbra-theme-compatibility.php declared BD_BookShelfHelper, the same
name as the library module's helper. Latent while the plugins were
separate (only fired when both were active), but an unconditional fatal
once merged. Renamed to Umbra_Theme_Compatibility with a class_alias.
* All three modules called add_menu_page. One top-level menu is now
registered by the bootstrap at admin_menu priority 9.
* BD Bookshelf and BookShelfHelper both claimed bd-bookshelf-settings, leaving
one Settings screen unreachable -> umbra-bookshelf-settings and
umbra-bookshelf-library-settings.
* Catalogue and library both enqueued bd-bookshelf-admin; the second enqueue
was silently discarded -> unique handles per module.
* Umbra_Admin and Umbra_Migration both registered bd_bookshelf_import_csv, so
one handler silently replaced the other. The import page now lives only in
Umbra_Admin (the variant wired to the admin JS); Umbra_Migration keeps only
the preview/run endpoints it uniquely provides.
* Modules were constructed from an init callback, so their own init
registrations raced the hook being dispatched. Now constructed on
plugins_loaded behind a re-entrancy guard.
Also
* Missing assets created: assets/images/default-cover.png (referenced but
never committed, so every cover-less book 404'd) and email/assets/js/
admin.js (enqueued on every email admin page but never committed).
* Library module's strpos($hook, 'bd-bookshelf') asset check matched every
catalogue and email screen once slugs shared the umbra-bookshelf- prefix;
now matched against its own slug list.
* Consolidated uninstall deduplicates the double drop of bd_books/bd_series.
* Specs aligned to the new name; pre-merge specs retained under
spec/archive/ with provenance notes.
* Tests added: tests/verify_structure.py (static) and tests/smoke_runtime.php
(WordPress-stub runtime boot, front-end and admin contexts).
Deferred and recorded in docs/KNOWN-ISSUES.md: the catalogue and library
modules still create bd_books and bd_series with two incompatible schemas
(pre-existing, now unconditional), and Goodreads/Amazon scraping is still
implemented twice on shared cron hooks.
5.2 KiB
BD Bookshelf Plugin - Additional Questions (v0.0.2)
These questions arose from reviewing the answers provided in v0.0.1.
1. Web Scraping
Q1.1: For scraping Amazon and Goodreads, what User-Agent string should we use? Options:
- (a) A realistic browser User-Agent (e.g., Chrome on Windows)
- (b) A custom User-Agent identifying the plugin (e.g.,
BD-Bookshelf/1.0) - (c) Configurable by admin
A: a)
Q1.2: Should we implement a proxy service for scraping to avoid rate limiting? Options:
- (a) No proxy (direct requests only)
- (b) Optional proxy configuration in settings
- (c) Required proxy service integration
A: a) - The plugin should put in delays to avoid rate limiting. The ratings are not real time critical.
Q1.3: For scraping Amazon, should we scrape:
- (a) The main product page (
/dp/{ASIN}) - (b) The reviews page (
/product-reviews/{ASIN}) - (c) Both (product page for rating, reviews page for count)
A: a) The most accessed page.
Q1.4: For scraping Goodreads, should we scrape:
- (a) The book page (
/book/show/{id}) - (b) The author page (
/author/show/{id}) - (c) Both (book page for rating, author page for author info)
A: a)
2. Series Management
Q2.1: Should series have their own pages on the frontend? Options:
- (a) Yes, auto-generate a series page listing all books
- (b) No, series are only for organizational purposes in admin
- (c) Configurable by admin A: b) a future plugin can expand on this.
Q2.2: Should books within a series be automatically ordered by:
- (a) Manual order (user-defined
series_order) - (b) Publication date
- (c) Title alphabetically
A: b)
Q2.3: Can a book belong to multiple series? Options:
- (a) Yes, a book can be in multiple series
- (b) No, a book can only be in one series
A: b)
3. Multiple Authors
Q3.1: When displaying authors, should the plugin:
- (a) Show all authors equally
- (b) Highlight the primary author
- (c) Configurable by admin
A: a)
Q3.2: Should the plugin support author photos/avatars? Options:
- (a) Yes, allow uploading author photos
- (b) No, use WordPress user avatars only
- (c) Use Gravatar based on author email
A: This is the primary author website. The other authors will have a wordpress avatar only.
4. Affiliate Cookie
Q4.1: What should the affiliate cookie duration be? Options:
- (a) 24 hours
- (b) 30 days (standard for most affiliate programs)
- (c) Configurable by admin
A: b) Use the program stanard
Q4.2: Should the affiliate cookie store:
- (a) Just the affiliate code
- (b) Affiliate code + source page
- (c) Affiliate code + source page + timestamp
A: a)
5. SEO Sitemap
Q5.1: For the sitemap, what priority should book pages have? Options:
- (a) Fixed priority (e.g., 0.8)
- (b) Configurable per book
- (c) Based on rating (higher rating = higher priority)
A: c)
Q5.2: What change frequency should book pages have in sitemap? Options:
- (a)
weekly - (b)
monthly - (c) Configurable per book
A: b)
6. Custom Shortcode Analytics
Q6.1: How long should click analytics data be retained? Options:
- (a) Indefinitely (no cleanup)
- (b) 90 days
- (c) 1 year
- (d) Configurable by admin
A: c)
Q6.2: Should IP addresses be:
- (a) Stored in full
- (b) Anonymized (last octet removed)
- (c) Not stored at all (only count)
A: a) This needs to be tracked to have analytics about using the site for spaming from this site. A hacker could exploit the redirects to make it look like the wordpress site is causing an issue.
7. GDPR Consent Banner
Q7.1: Should the consent banner be dismissible without accepting? Options:
- (a) Yes, user can close without accepting
- (b) No, must accept to continue browsing
- (c) Configurable by admin
A: b)
Q7.2: Should the consent banner reappear after:
- (a) 30 days (when cookie expires)
- (b) Every session
- (c) Never (once accepted, stays accepted)
A: a) Stored as part of the cookie and expires with the cookie.
8. Retail Link Display
Q8.1: For the retail grid, what icon style should we use? Options:
- (a) Simple icons (letter/abbreviation)
- (b) Official retail site logos
- (c) Custom icon set bundled with plugin
A: Give the option for the user to use uploaded images/icons. Otherwise use simple icons - option a
Q8.2: Should the retail grid be:
- (a) Horizontal row (wraps on mobile)
- (b) Vertical list
- (c) Grid layout (configurable columns)
A: c) use as much of the screen as possible.
9. Rating Display
Q9.1: For star ratings, what icon set should we use? Options:
- (a) Unicode stars (★☆)
- (b) Font Awesome icons
- (c) Custom SVG icons bundled with plugin
A: a) if possible.
Q9.2: Should half-star ratings be supported? Options:
- (a) Yes, show half stars (e.g., 4.5)
- (b) No, round to nearest whole star
- (c) Configurable by admin
A: a) half star are needed.
10. Data Migration
Q10.1: If the author has existing books in WordPress (as posts or CPTs), should the plugin provide:
- (a) A migration tool to import into the new system
- (b) No migration (start fresh)
- (c) CSV import functionality
A: a)
Please provide your answers to these questions. Each answer will be incorporated into the final specification.