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
- Environment Variables
- Build Images
- Start Servers
- Run Audits
- Contact Us
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.
- Install Composer and test if it works by running
- 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 glidecan 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.
- Use the shell script to try an automatically install it.
- Install Make for Windows (Windows only)
makecommand is not available on Windows by default and you must install it to be able to use the Tide
$PATHonce you've installed the package.
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
C:\Users\YourName\go) on Windows.
Create the following directory inside your Go workspace:
Open a shell and change into the directory:
git clone -b develop --recursive https://github.com/wptide/wptide.git
Change to Tide working directory:
git submodule update --init --recursive
.env.dist file to
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 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.
We typically update at minimum the following environment variables in the
||The email associated with the local admin account. Default is
||The password associated with the local admin account. Default is
||The username associated with the local admin account. Default is
||The API key used both locally and on GCP to authenticate the
||The API secret used both locally and on GCP to authenticate the
To make local development simple we have added default values for the
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
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.
From the project root directory run the following
make commands to initialize and setup WordPress.
Install the dependencies as follows:
Then start the API Docker images in isolation:
Open a new shell and run the setup script:
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.
Add the following entry to your hosts file to make sure
tide.local is pointed at your local Tide instance:
You can change the
tide.local URL to some other value by modifying the
API_HTTP_HOST variables inside the
Installs the Glide dependencies, creates the Go binaries, and builds all the Docker images:
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:
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:
Or for the
akismet plugin version
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.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
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)
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.
Tide utilizes an MIT license.