Is there a standard for naming plugin versions

My business partner and I are developing several plugins and we want to know if there is a standard for the version number of a plugin when there are updates, i.e., version 1.0, version 1.2, version 1.2.3, etc?

Thanks for any advise.

Related posts

Leave a Reply

2 comments

  1. No, there is no standard. You can even use names, roman numerals or whatever, but I would not recommend it.

    Most authors use Semantic Versioning: Major.Minor.Patch.

    This has several drawbacks:

    • Users are afraid of “big changes”. Upgrades for a new version with a change in the first part (Major) are often delayed, or users are waiting for the first “service pack” (2.0.1).
    • Developers are sometimes not sure when to change which part. What is major? A big code change may have little impact for the user experience.
    • The length of a version number is not predictable. 1.2.3 vs. 2.12.123. Not a big deal, but not ideal.

    In practice, Semantic Versioning isn’t that semantic.

    I prefer the date as version number: 2012.11.19

    • Changes in the first number are obviously not related to “big changes” in the program.
    • No 0 at the end. Never. 🙂
    • Always the same length (except when you have more than one version per day).
    • Compatible with version_compare() – this could be seen as a standard.

    Recommended reading:

    Both schemes work. The difference is mostly in the user experience.

  2. The standard for version numbers in PHP works like this:

    MAJOR dot MINOR dot REVISION

    Each of these is an integer, and independent from the rest. It is not a decimal number. This is important because of how version_compare works.

    MAJOR is the major version. You’d update this number after a major change to the code, such as completely revamping the way the code works.

    MINOR is the minor version. You’d update this number after a minor change to the code, such as adding a new feature.

    REVISION is a revision number. You’d update this after a change to an existing minor version, such as a bugfix.

    Now, again versions are integers separated by dots. So, because of this, version 1.1 = 1.01 ; both of those version numbers are identical, the major version is 1, the minor version is 1.

    For another example, version 1.9 is less than version 1.10 ; the minor version has changed from nine to ten.

    Because WordPress uses the version_compare function of PHP, you kinda have to follow these methods for version numbering.

    Note that WordPress itself is an exception in a minor way, in that the core goes from 2.9 to 3.0. This is legacy, and just the way they’ve always done numbering. It’s compatible with the version_compare function, but generally speaking one should go from 2.9 to 2.10 if there’s no significant rewrite to justify the major version bump.