Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Common Libraries #7

@alanef

Description

@alanef

There are effectively two types of plugin that I can think of that has dependencies

  1. addon plugins - for example a plugin that adds features to WooCommerce

  2. plugins that use other plugins as libraries, e,g, using CMB2

I want to talk about type 2.

I think that 'new 'plugins submitted as frameworks or libraries are no longer acceptable / frowned up

What many plugins do is include third party open source libraries, indeed this is possible with CMB2, but there are many other libraries such as the Stripe PHP SDK in common use.

What this then means each plugin loads their own copy of the libraries and unless they are specifically designed for WP this can result in conflicts ( e.g. different versions of the Stripe PHP SDK are not compatible - so require them to be re-namespaced to avoid conflict ).

What I think would be a good idea is to have curated set of the most common third party libraries and a WordPress driven autoloading subsystem for these so only the library is loaded.

I do realise this changes a dynamic of plugin in that they currently only have to use WP core libraries and introducing third party libraries starts to get complex in terms impact of change, however today we have the issue of 'plugin conflicts' Also a security fix to a common third party library can be done once rather than chasing say 1,000 developers.

That is my thoughts so wanted to at least bring it up here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions