Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Option Tree Laravel Package

valendesigns/option-tree

OptionTree is a WordPress options framework for adding custom settings pages and meta boxes to themes and plugins. It provides an intuitive admin UI for theme options, custom fields, and settings import/export without extensive coding.

View on GitHub
Deep Wiki
Context7

Technical Evaulation

Framing correction (material to the decision): OptionTree is not a Laravel package. It is a WordPress theme-options and meta-box UI builder — a procedural PHP library that boots inside wp-admin, registers itself on WordPress hooks (admin_menu, admin_enqueue_scripts, init), and persists data through the WordPress Options API (wp_options) and post meta (wp_postmeta). There is no Composer package, no PSR-4 autoloading, no namespacing, no service provider, no container bindings, no config publishing, and no test suite. The "Laravel/PHP package" label in the intake record is a taxonomy artifact of the sourcing tool, not a technical description. Any assessment that treats this as installable into a Laravel application via composer require is wrong at the first step.

Architecture fit: Poor for a Laravel codebase. OptionTree assumes WordPress core globals ($wpdb, $pagenow, get_option, wp_nonce_field, wp_enqueue_script) and a WordPress admin request lifecycle. Laravel's request kernel, middleware pipeline, and Blade/Livewire rendering have no overlap with that model. The only architecturally coherent placements are (a) a WordPress theme or plugin, or (b) a hybrid estate where WordPress runs as a content/options backend and Laravel is a separate consumer. In case (b), OptionTree stays entirely on the WordPress side and Laravel reads its output over HTTP or shared database — it is never embedded in the Laravel process.

Integration feasibility:

  • Direct embedding in Laravel: not feasible without a shim layer that reimplements large parts of the WordPress admin API. Cost of the shim exceeds the cost of rebuilding the feature.
  • Hybrid/headless: feasible. Expose OptionTree values through WP REST (custom endpoint or a thin wrapper over get_option('option_tree')), consume in Laravel with caching and a typed DTO. This is a data-contract integration, not a code dependency — the right shape.
  • WordPress-native: feasible but the plugin is dormant; treat as a fork-and-own dependency, not a maintained one.
  • Rebuild in Laravel: the highest-value path. OptionTree's actual product surface is a declarative settings schema (field types, sections, conditional logic) plus a persistence layer. Filament, Nova, or a Livewire form builder reproduces this in weeks, with maintained dependencies and native authz.

Technical risk: High and concentrated in abandonment and provenance. Last release 2019-05-19; no upstream security patching for roughly six years. Code is PHP 7.x-era and will surface deprecations and likely fatals on PHP 8.2+. Admin UI is jQuery-generation JavaScript with no build pipeline or CSP posture. Repository field is unknown — supply-chain provenance is unverified, which is a blocking finding for any procurement or SCA gate (expect the dependency to be flagged as abandoned by any modern scanner). License is GPL-2.0: acceptable inside a GPL WordPress theme, but a legal review trigger if the intent is to ship it inside or alongside proprietary Laravel application code. The low opportunity score (21.1) and composite score (24.57) are consistent with these findings — they are not noise.

Key questions to resolve before committing effort:

  1. Is WordPress actually present in the target estate, or is this a Laravel-only product? (A "no" ends the evaluation.)
  2. Do we need OptionTree's behavior (a theme-options UI) or its data (existing option_tree rows we must preserve)? Behavior → rebuild. Data → one-time migration script.
  3. What PHP and WordPress versions are in scope, and is there a hard PHP 8.2+ mandate?
  4. Who owns the GPL obligation, and does the distribution model (SaaS vs. shipped theme) change it?
  5. Is there an acceptable maintained substitute — Carbon Fields, ACF, Kirki, or Redux on the WP side; Filament or Nova on the Laravel side?
  6. Is there a maintained community fork we can pin, or are we forking from the 2019 tag ourselves?

Integration Approach

Stack fit: Treat OptionTree as WordPress-tier only. The viable target architecture is: WordPress (or an existing WP theme) hosts OptionTree for editorial/theme configuration; Laravel owns the application domain, auth, and API surface; a narrow, versioned read contract carries option values from WP to Laravel. Nothing from the OptionTree directory is autoloaded by Laravel.

Migration path (recommended, in order of preference):

  1. Rebuild natively (default recommendation). Model the existing OptionTree schema — sections, field types, defaults, conditional display rules — as a declarative config in Laravel, rendered through Filament/Nova/Livewire, persisted to a dedicated settings table (or settings JSON column) with per-key rows rather than one serialized blob. This removes the dependency, closes the security and licensing exposure, and lands on a maintained stack.
  2. Data-preserving cutover. Write a one-time importer that reads wp_options.option_tree and wp_options.option_tree_settings, flattens the serialized arrays, and maps keys to the new schema. Run dual-write for one release cycle; keep a read adapter so any unmapped key degrades to a logged default rather than a null.
  3. Hybrid bridge (only if WordPress must remain the authoring surface). Stand up a WP REST endpoint returning a normalized, cached options payload; Laravel consumes it behind a cache with a stale-while-revalidate policy and a typed DTO. Contract-test the payload shape in CI.

Compatibility: If any WP-side usage is retained, pin PHP and WP versions explicitly, validate the admin screens under the actual runtime (not a local PHP 7.4), and run the plugin through PHPCompatibility and a CSP/escaping review. For vendoring, add the fork as a Composer path or vcs repository with an explicit branch alias — do not rely on Packagist, which does not carry it.

Sequencing: (1) Confirm stack reality — WP present or not; (2) inventory every option_tree key consumed anywhere in the codebase, with call sites; (3) two-day technical spike installing the 2019 tag on the target PHP/WP to measure breakage and confirm the admin UI is even usable; (4) build-vs-fork decision gate with costed options; (5) schema + importer implementation with a rollback plan; (6) decommission checklist (remove plugin, drop option rows only after a verified backup and a full release cycle).

Operational Impact

Maintenance: Effectively an internal fork from day one. No upstream commits since 2019 means every future PHP or WP core upgrade is our patch to write. Budget a standing owner and a small annual hardening allocation; if that owner does not exist, the correct decision is to not adopt.

Support: Community-only, dormant tracker, 632 stars, no vendor SLA. Escalation path is "read the source." This is acceptable for a small internal theme tool and unacceptable for anything customer-facing or revenue-path.

Scaling: Modest and non-linear in the right direction. OptionTree stores whole option groups as serialized arrays in wp_options; those rows are typically autoloaded, inflating every request's option cache, and a single large row becomes a write-contention point. Meta boxes write wp_postmeta per field, producing wide rows and admin-side N+1 queries at high field counts. Public-traffic scaling is fine behind page/object cache; admin and editorial throughput degrade as field counts and option payloads grow. The Laravel-native rebuild replaces this with per-key rows and targeted cache invalidation, which scales materially better.

Failure modes to plan for: PHP 8.x deprecations escalating to fatals in admin; jQuery/admin script collisions with modern WP admin or other plugins; silent data loss from unserialize failures or a botched schema migration; autoloaded option bloat degrading site-wide TTFB; missing or incomplete nonce/capability checks in older code paths (privilege escalation surface); GPL contamination findings in legal or M&A diligence; SCA tooling flagging the dependency as abandoned and blocking release gates.

Ramp-up: The concept is simple — it is a declarative form builder with a persistence layer — so a mid-level engineer understands it in a day. The archaeology is what costs: tracing which theme or plugin reads which key, and reverse-engineering undocumented serialized structures. Estimate 1–2 days for the spike and inventory, roughly 3–6 weeks to rebuild and migrate natively in Laravel with tests and a rollback path, or 2–4 weeks to fork, patch, and harden the 2019 code with an ongoing maintenance tail. The rebuild is the lower total-cost-of-ownership option and the one I would take to a decision review.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource