Skip to main content


GitHub repository

If you haven't already, check out the source code before proceeding:

git clone
cd image-display-control-wordpress/

Code formatting

Pull and run prettier with:

npm install
npm run format


Running the unit tests

Setting up PHPUnit

Install PHPUnit with:

sudo apt install composer
composer install

Running PHPUnit

Run the unit tests with:

composer test

Validating against WordPress coding standards

Setting up PHP_CodeSniffer

First pull the WordPress coding standards in to wpcs/ by running:

docker run --rm -it --volume $PWD:/app -u `id -u`:`id -g` \
composer:1.10.19 create-project wp-coding-standards/wpcs --no-dev

We're using a Composer Docker image old enough to contain PHP 7 instead of PHP 8, as the coding standards don't support PHP 8 yet.

Then configure PHP_CodeSniffer to know where to find the WordPress coding standards by running:

$ ./wpcs/vendor/bin/phpcs -i
The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz and Zend

$ ./wpcs/vendor/bin/phpcs --config-set installed_paths wpcs/
Using config file: /.../image-display-control-wordpress/wpcs/vendor/squizlabs/php_codesniffer/CodeSniffer.conf
Config value "installed_paths" added successfully

$ ./wpcs/vendor/bin/phpcs -i
The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra

Finally pull the rulesets for PHP cross-version compatibility with:

cd wpcs/
docker run --rm -it --volume $PWD:/app -u `id -u`:`id -g` \
composer:1.10.19 require --dev phpcompatibility/phpcompatibility-wp:"*"
cd ../

Running PHP_CodeSniffer

Run PHP_CodeSniffer with:

composer lint


Version number

Choose the next version number according to the rules of Semantic Versioning and set it in the following files:

  • frameright.php
  • readme.txt


Describe the changes made compared to the last released version in:

Browse the git history to make sure nothing has been left out.

Last tweaks and checks

Format and validate the source one last time:

npm run format
composer lint
composer test

Commit and push any local changes:

git add -A
git commit -m "<my message>"
git push

Git tag

In the rest of this document we'll assume you are releasing version 1.2.3. Create a git tag for the version you are releasing by running:

git tag 1.2.3
git push --tags

Build the plugin as a ZIP file

Build the package locally by running:

git archive -o HEAD

Set up SVN

WordPress plugins are released to the WordPress Plugin Directory using SVN.

Check out the repository:

cd ../
svn co
cd image-display-control/
svn update

Commit to SVN

Replace the trunk files with the previously built archive:

svn delete trunk
mkdir trunk
cd trunk/
mv ../../image-display-control-wordpress/ .
cd ../
svn add trunk
svn status

Commit the trunk changes and create a new tag:

svn copy trunk tags/1.2.3
svn commit -m "1.2.3" --username my-wordpress-username --password 'foo'

Check the result at


Some things on the WordPress Plugin Directory, like search results, may take 72 hours to get updated.