{"id":20742666,"url":"https://github.com/itinerisltd/itineris-wp-coding-standards","last_synced_at":"2025-12-24T22:20:48.066Z","repository":{"id":56994299,"uuid":"153601016","full_name":"ItinerisLtd/itineris-wp-coding-standards","owner":"ItinerisLtd","description":"Code style and quality tools to be used in Itineris WordPress projects","archived":false,"fork":false,"pushed_at":"2024-04-29T10:53:54.000Z","size":122,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-04T05:13:49.925Z","etag":null,"topics":["coding-standards","phpcs-standard"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ItinerisLtd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-18T09:47:00.000Z","updated_at":"2022-09-01T11:26:59.000Z","dependencies_parsed_at":"2024-05-03T05:26:08.780Z","dependency_job_id":null,"html_url":"https://github.com/ItinerisLtd/itineris-wp-coding-standards","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":0.08333333333333337,"last_synced_commit":"f74a6c9e05638d7eafd54b6f7f8f5ff3a3ebc05e"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItinerisLtd%2Fitineris-wp-coding-standards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItinerisLtd%2Fitineris-wp-coding-standards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItinerisLtd%2Fitineris-wp-coding-standards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItinerisLtd%2Fitineris-wp-coding-standards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItinerisLtd","download_url":"https://codeload.github.com/ItinerisLtd/itineris-wp-coding-standards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243033639,"owners_count":20225200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coding-standards","phpcs-standard"],"created_at":"2024-11-17T07:06:57.351Z","updated_at":"2025-12-24T22:20:48.021Z","avatar_url":"https://github.com/ItinerisLtd.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Itineris WP Coding Standards\n\n[![Packagist Version](https://img.shields.io/packagist/v/itinerisltd/itineris-wp-coding-standards.svg)](https://packagist.org/packages/itinerisltd/itineris-wp-coding-standards)\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/itinerisltd/itineris-wp-coding-standards.svg)](https://packagist.org/packages/itinerisltd/itineris-wp-coding-standards)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/itinerisltd/itineris-wp-coding-standards.svg)](https://packagist.org/packages/itinerisltd/itineris-wp-coding-standards)\n[![GitHub License](https://img.shields.io/github/license/itinerisltd/itineris-wp-coding-standards.svg)](https://github.com/ItinerisLtd/itineris-wp-coding-standards/blob/master/LICENSE)\n[![Hire Itineris](https://img.shields.io/badge/Hire-Itineris-ff69b4.svg)](https://www.itineris.co.uk/contact/)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Goal](#goal)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Required Readings](#required-readings)\n- [FAQs](#faqs)\n  - [Will you add support for older PHP versions?](#will-you-add-support-for-older-php-versions)\n  - [It looks awesome. Where can I find some more goodies like this?](#it-looks-awesome-where-can-i-find-some-more-goodies-like-this)\n  - [This isn't on wp.org. Where can I give a :star::star::star::star::star: review?](#this-isnt-on-wporg-where-can-i-give-a-starstarstarstarstar-review)\n- [Feedback](#feedback)\n- [Security](#security)\n- [Credits](#credits)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Goal\n\n[Itineris WP Coding Standards](https://github.com/ItinerisLtd/itineris-wp-coding-standards) is a project with rulesets for code style and quality tools to be used in Itineris WordPress projects.\n\nIt is a mix of [PSR-1](https://www.php-fig.org/psr/psr-1/), [PSR-2](https://www.php-fig.org/psr/psr-2), [PSR-4](https://www.php-fig.org/psr/psr-4/), [PSR-12](https://github.com/php-fig/fig-standards/blob/master/proposed/extended-coding-style-guide.md), [Slevomat](https://github.com/slevomat/coding-standard) and [WordPress](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) coding standards.\n\nWhenever there's a conflict between PSR and WPCS, always prefer PSR.\n\nCurrently, it works for WordPress plugins.\nUsing it on [Bedrock](https://github.com/roots/bedrock) or [Sage](https://github.com/roots/sage) requires some tweaking.\n\n## Installation\n\n```sh-session\ncomposer require --dev itinerisltd/itineris-wp-coding-standards\n```\n\n## Usage\n\nFirst, create [`phpcs.xml`](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset) on project root:\n\n```xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003cruleset name=\"Plugin\"\u003e\n    \u003c!-- Check all files under project root --\u003e\n    \u003cfile\u003e./\u003c/file\u003e\n\n    \u003c!-- Show colors in console --\u003e\n    \u003carg value=\"-colors\"/\u003e\n\n    \u003c!-- Show progress and sniff codes in all reports; Show progress of the run --\u003e\n    \u003carg value=\"sp\"/\u003e\n\n    \u003c!-- Scan only PHP files --\u003e\n    \u003carg name=\"extensions\" value=\"php\"/\u003e\n\n    \u003c!-- Use Itineris WP Coding Standards --\u003e\n    \u003crule ref=\"Itineris\"/\u003e\n\n    \u003c!-- TODO: Change everything below! --\u003e\n    \u003c!-- TODO: Exclude specific rules if necessary --\u003e\n\n    \u003c!-- TODO: Exclude some files --\u003e\n    \u003cexclude-pattern\u003e/my-awesome-plugin.php\u003c/exclude-pattern\u003e\n    \u003cexclude-pattern\u003e/tests/*\u003c/exclude-pattern\u003e\n    \u003cexclude-pattern\u003e/vendor/*\u003c/exclude-pattern\u003e\n\n    \u003c!-- TODO: Define minimum supported WordPress version --\u003e\n    \u003cconfig name=\"minimum_supported_wp_version\" value=\"6.2\"/\u003e\n\n    \u003c!-- TODO: Define expected text domains --\u003e\n    \u003crule ref=\"WordPress.WP.I18n\"\u003e\n        \u003cproperties\u003e\n            \u003cproperty name=\"text_domain\" type=\"array\"\u003e\n                \u003celement value=\"my-plugin\"/\u003e\n                \u003celement value=\"my-theme\"/\u003e\n                \u003celement value=\"woocommerce\"/\u003e\n                \u003celement value=\"sage\"/\u003e\n            \u003c/property\u003e\n        \u003c/properties\u003e\n    \u003c/rule\u003e\n\u003c/ruleset\u003e\n```\n\nThen, define [composer scripts](https://getcomposer.org/doc/articles/scripts.md) in `composer.json`:\n\n```json\n{\n  \"scripts\": {\n    \"style:check\": \"phpcs\",\n    \"style:fix\": \"phpcbf\"\n  }\n}\n```\n\nRun the commands:\n\n```sh-session\ncomposer style:check\ncomposer style:fix\n```\n\n## Required Readings\n\n- [Whitelisting code which flags errors](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Whitelisting-code-which-flags-errors)\n- [Flagged superglobal usage in WordPress VIP](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Flagged-superglobal-usage-in-WordPress-VIP)\n- [Fixing errors for input data](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Fixing-errors-for-input-data)\n- [Sanitizing array input data](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Sanitizing-array-input-data)\n- [Customizable sniff properties](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties)\n\n## FAQs\n\n### Will you add support for older PHP versions?\n\nNever! This plugin will only work on [actively supported PHP versions](https://secure.php.net/supported-versions.php).\n\nDon't use it on **end of life** or **security fixes only** PHP versions.\n\n### It looks awesome. Where can I find some more goodies like this?\n\n- Articles on [Itineris' blog](https://www.itineris.co.uk/blog/)\n- More projects on [Itineris' GitHub profile](https://github.com/itinerisltd)\n- More plugins on [Itineris](https://profiles.wordpress.org/itinerisltd/#content-plugins) and [TangRufus](https://profiles.wordpress.org/tangrufus/#content-plugins) wp.org profiles\n- Follow [@itineris_ltd](https://twitter.com/itineris_ltd) and [@TangRufus](https://twitter.com/tangrufus) on Twitter\n- Hire [Itineris](https://www.itineris.co.uk/services/) to build your next awesome site\n\n### This isn't on wp.org. Where can I give a :star::star::star::star::star: review?\n\nThanks! Glad you like it. It's important to let my boss knows somebody is using this project. Please consider:\n\n- tweet something good with mentioning [@itineris_ltd](https://twitter.com/itineris_ltd) and [@TangRufus](https://twitter.com/tangrufus)\n- :star: star this [Github repo](https://github.com/ItinerisLtd/itineris-wp-coding-standards)\n- :eyes: watch this [Github repo](https://github.com/ItinerisLtd/itineris-wp-coding-standards)\n- write blog posts\n- submit [pull requests](https://github.com/ItinerisLtd/itineris-wp-coding-standards)\n- [hire Itineris](https://www.itineris.co.uk/services/)\n\n## Feedback\n\n**Please provide feedback!** We want to make this library useful in as many projects as possible.\nPlease submit an [issue](https://github.com/ItinerisLtd/itineris-wp-coding-standards/issues/new) and point out what you do and don't like, or fork the project and make suggestions.\n**No issue is too small.**\n\n## Security\n\nIf you discover any security related issues, please email [dev@itineris.co.uk](mailto:dev@itineris.co.uk) instead of using the issue tracker.\n\n## Credits\n\n[Itineris WP Coding Standards](https://github.com/ItinerisLtd/itineris-wp-coding-standards) is a [Itineris Limited](https://www.itineris.co.uk/) project created by [Tang Rufus](https://typist.tech).\n\nFull list of contributors can be found [here](https://github.com/ItinerisLtd/itineris-wp-coding-standards/graphs/contributors).\n\n## License\n\n[Itineris WP Coding Standards](https://github.com/ItinerisLtd/itineris-wp-coding-standards) is released under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinerisltd%2Fitineris-wp-coding-standards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitinerisltd%2Fitineris-wp-coding-standards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinerisltd%2Fitineris-wp-coding-standards/lists"}