All Projects â†’ wptide â†’ wptide

wptide / wptide

Licence: MIT license
🌊 Tide is a series of automated tests run against every WordPress.org theme and plugin

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Smarty
1635 projects
PHP
23972 projects - #3 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to wptide

Phpcompatibility
PHP Compatibility check for PHP_CodeSniffer
Stars: ✭ 1,705 (+2114.29%)
Mutual labels:  php-codesniffer, phpcs, phpcompatibility-standard, phpcompatibility
Wordpress Coding Standards
PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions
Stars: ✭ 2,070 (+2588.31%)
Mutual labels:  php-codesniffer, phpcs, wordpress-standards
phpcs-psr4-sniff
[READ-ONLY] PHP_CodeSniffer sniff that checks class name matches PSR-4 project structure.
Stars: ✭ 23 (-70.13%)
Mutual labels:  coding-standards, php-codesniffer, phpcs
PHPCompatibilityWP
PHPCompatibility ruleset for WordPress projects
Stars: ✭ 141 (+83.12%)
Mutual labels:  php-codesniffer, phpcompatibility
Codor
Custom PHPCS sniffs to find Code Smells
Stars: ✭ 40 (-48.05%)
Mutual labels:  coding-standards, php-codesniffer
phpcs-gitlab
Gitlab Report for PHP_CodeSniffer (display the violations in the Gitlab CI/CD Code Quality Report)
Stars: ✭ 29 (-62.34%)
Mutual labels:  php-codesniffer, phpcs
php-codesniffer-sniffs
Custom sniffs for PHP_CodeSniffer
Stars: ✭ 16 (-79.22%)
Mutual labels:  coding-standards, php-codesniffer
coding-standard
Consistence - Coding Standard - PHP Code Sniffer rules
Stars: ✭ 73 (-5.19%)
Mutual labels:  coding-standards, php-codesniffer
sniff
Simpler PHP code sniffer built on top of PHP-CS-Fixer.
Stars: ✭ 14 (-81.82%)
Mutual labels:  coding-standards, php-codesniffer
wpcs-docs
WordPress Coding Standards Docs
Stars: ✭ 59 (-23.38%)
Mutual labels:  coding-standards, phpcs
playwright-lighthouse
🎭: Playwright Lighthouse Audit
Stars: ✭ 120 (+55.84%)
Mutual labels:  lighthouse
lighthouse-chromium-alpine-docker
Run Google's Lighthouse headless in the background
Stars: ✭ 16 (-79.22%)
Mutual labels:  lighthouse
e7mon
Ethereum clients monitor
Stars: ✭ 30 (-61.04%)
Mutual labels:  lighthouse
lighthouse-batch-parallel
A module for helping collecting websites' Lighthouse audit data in batches. Get the report data stream in CSV, JS Object or JSON format. Also provide a cli-tool to generate the report file in CSV or JSON format directly.
Stars: ✭ 22 (-71.43%)
Mutual labels:  lighthouse
eslint-config-javascript
Write bulletproof JavaScript like a pro! 😎
Stars: ✭ 34 (-55.84%)
Mutual labels:  coding-standards
grunt-wp-css
Format style sheets according to the WordPress CSS coding standards.
Stars: ✭ 36 (-53.25%)
Mutual labels:  coding-standards
slim-skeleton
Slim Framework skeleton application following MVC construction
Stars: ✭ 18 (-76.62%)
Mutual labels:  phpcs
azure-pipelines-lighthouse
Embed Google Lighthouse HTML reports into Azure Pipelines
Stars: ✭ 37 (-51.95%)
Mutual labels:  lighthouse
eslint-config
MOXY eslint configuration to be used across several JavaScript projects
Stars: ✭ 14 (-81.82%)
Mutual labels:  coding-standards
cscs
A curated list of Coding Style Conventions and Standards.
Stars: ✭ 1,486 (+1829.87%)
Mutual labels:  coding-standards

Tide

Build Status Coverage Status License: MIT Contributions Welcome Shipping faster with ZenHub.io

A rising tide lifts all boats. -- United States President, John F. Kennedy (borrowed from the New England Council)

Tide is an automated tool to provide insight into WordPress code and highlight areas to improve the quality of plugins and themes.

We believe the web can be better. With Tide, the code which underpins every website can be more standardized, faster, and more secure. Tide is focused on WordPress because no other platform has as large an impact on the state of the web. Tide raises the quality of code one plugin or theme at a time, by elevating the importance of code quality in the developer consciousness. Because a rising Tide lifts all boats.

Table of Contents

Introduction

The main focus of this documentation is to setup a local development environment. If you want to deploy to a cloud environment, please read our full documentation.

Dependencies

  • Install Composer and test if it works by running composer --version.
  • Install Docker. Note: you may not be able to setup and run Tide properly with legacy Docker Toolbox.
  • Install Go and test if your installation works by following the instructions on the installation page.
  • Install Glide, a package manager for Go. There are a few ways to install Glide:
    • Use the shell script to try an automatically install it. curl https://glide.sh/get | sh
    • Download a versioned release. Glide releases are semantically versioned.
    • Use a system package manager to install Glide. For example, brew install glide can be used if you're using Homebrew on Mac.
    • The latest development snapshot can be installed with go get. For example, go get -u github.com/Masterminds/glide. This is not a release version.
  • Install Make for Windows (Windows only)
    • The make command is not available on Windows by default and you must install it to be able to use the Tide make commands.
    • Add C:\zlib\bin to your $PATH once you've installed the package.

Cloning

Tide needs to be cloned to a directory inside your Go workspace specified by the $GOPATH environment variable. Your $GOPATH defaults to a directory named go inside your home directory, so $HOME/go on Mac/Unix and %USERPROFILE%\go (usually C:\Users\YourName\go) on Windows.

Create the following directory inside your Go workspace:

src/github.com/wptide

Open a shell and change into the directory:

cd $GOPATH/src/github.com/wptide

Clone Tide:

git clone -b develop --recursive https://github.com/wptide/wptide.git

Change to Tide working directory:

cd wptide

Update submodules:

git submodule update --init --recursive

Environment Variables

Copy the .env.dist file to .env.

cp .env.dist .env

If you are running Tide locally, you do not need to change any of these .env values. If you are deploying this into the cloud, make sure to look at the full documentation for which variables you should update and their values.

Create an empty .env.gcp file.

touch .env.gcp

The .env.gcp file overwrites the .env file values and can be left blank if you are running Tide locally. These files are used to store custom values of environment variables for various services. Before setting up any of the services, update the values according to the instructions for each service. The variables and their descriptions can be found at the end of each relevant section in our full documentation.


API

We typically update at minimum the following environment variables in the .env file:

Variable Description
API_ADMIN_EMAIL The email associated with the local admin account. Default is [email protected]. Note: unless you setup the Gmail SMTP plugin, any generated emails will not get sent by WordPress.
API_ADMIN_PASSWORD The password associated with the local admin account. Default is wordpress.
API_ADMIN_USER The username associated with the local admin account. Default is admin.
API_KEY The API key used both locally and on GCP to authenticate the audit-server user. Default is uRhZgeYt$v5u0vR5fpcDSWcZU.
API_SECRET The API secret used both locally and on GCP to authenticate the audit-server user. Default is rVvUWQlPQr8trSEd2qdwmE4Eiua$MjLX.

To make local development simple we have added default values for the API_KEY and API_SECRET associated with the audit-server user, which will automatically update the user meta values when make api.setup is ran. However, you are free to change these values and we encourage you to, especially if you plan on deploying to the cloud — in that case you should overwrite these values in the .env.gcp file.

If you are running Tide in production, then you can access the auto generated key and secret from the audit-server user's profile after you setup the API and before you deploy the Kubernetes clusters.

Initialize WordPress

From the project root directory run the following make commands to initialize and setup WordPress.

Install the dependencies as follows:

make api.composer

Then start the API Docker images in isolation:

make api.up

Open a new shell and run the setup script:

make api.setup

You can run the setup script to initialize WordPress for the first time or if you would like a convenient way to update the default values when you change relevant environment variables.

Hosts File

Add the following entry to your hosts file to make sure tide.local is pointed at your local Tide instance:

127.0.0.1 tide.local

You can change the tide.local URL to some other value by modifying the API_AUTH_URL and API_HTTP_HOST variables inside the .env file.

Build Images

Installs the Glide dependencies, creates the Go binaries, and builds all the Docker images:

make build.images

Isolated Build

Lighthouse Image:

make lighthouse.build.image

PHPCS Image:

make phpcs.build.image

Sync Image:

make sync.build.image

Start Servers

It is recommended that you run these Docker containers separately and start the servers in new shells in order to isolate the output. However, you can start all services (API, Lighthouse Server, PHPCS Server, Sync Server) with the following command:

make up

Isolated Start

Lighthouse Server:

make lighthouse.up

PHPCS Server:

make phpcs.up

Sync Server:

make sync.up

Run Audits

Now that all the Tide services are up and running, you can run audits on themes and plugins by doing a GET request to a special endpoint either in your browser or with an app like Postman. This endpoint only initiates an audit for the wporg Tide user and for WordPress.org hosted themes and plugins.

If we want to run an audit against the twentyseventeen theme version 2.1 for example, we would use this endpoint:

http://tide.local/api/tide/v1/audit/wporg/theme/twentyseventeen/2.1

Or for the akismet plugin version 4.1.1:

http://tide.local/api/tide/v1/audit/wporg/plugin/akismet/4.1.1

When you request an audit you will receive a JSON object back that indicates the audit is pending. If the audit has previously been requested and is complete then you will receive a JSON object with information about the theme/plugin and summary reports with links to the full report.

If the audit is pending, your shell should have some output to indicate that the audit is running. Once this output stops and all your services go back to the polling status, you can refresh the API request in the browser and you should see the updated JSON object with completed Tide reports.

For a full list of API Endpoints that can be used with Tide, see the API Endpoints section.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Maintainers

Derek Herman (@valendesigns), and Jeffrey Paul (@jeffpaul)

Contributors

Props: Amit Dudhat (@wpamitkumar), Bartek Makoś (@MakiBM), Brendan Woods (@brendanwoods-xwp), Cathi Bosco (@cathibosco), Daniel Louw (@danlouw), David Cramer (@davidcramer), David Lonjon (@davidlonjon), Derek Herman (@valendesigns), Dušan D. Majkić (@dmajkic), Janki Moradiya (@jankimoradiya), Jeffrey Paul (@jeffpaul), Jonathan Wold (@sirjonathan), Joshua Wold (@jwold), Justin Kopepasah (@kopepasah), Keanan Koppenhaver (@kkoppenhaver), Leo Postovoit (@postphotos), Lubos Kmetko (@luboskmetko), Luke Carbis (@lukecarbis), Meet Makadia (@mrmakadia94), Miina Sikk (@miina), Mike Crantea (@mehigh), Otto Kekäläinen (@ottok), Pierre Gordon (@pierlon), Scott Reilly (@coffee2code), Rheinard Korf (@rheinardkorf), Rob Stinson (@robstino), Sayed Taqui (@sayedtaqui), Ulrich Pogson (@grappler), Utkarsh Patel (@PatelUtkarsh)

Contact Us

Have questions? Don't open an Issue, come join us in the #tide channel in WordPress Slack. Even though Slack is a chat service, sometimes it takes several hours for community members to respond — please be patient.

License

Tide utilizes an MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].