Test the new WPThemeReview standards

WPThemeReview is the official Theme Review Team coding standard used for checking the themes using PHP_CodeSniffer (PHPCS).

The aim of the WPThemeReview project is to automate the code analysis part of the Theme Review Process as much as possible using static code analysis.

Release of WordPress Coding Standards 2.0.0

Version 2.0.0 of WordPress Coding Standards (WPCS) was released two weeks ago, and it brought some changes to the WPCS ruleset. Juliette Reinders Folmer made a pull request with the changes needed for WPThemeReview to work with WPCS 2.0.0.

We need your help in testing these changes before releasing an update.

To set the WPThemeReview in your theme you’ll need Composer.

The following instructions are based on Mac, but you have detailed instructions in the contributing document.

Go to your theme folder and from the terminal run

composer require wptrt/wpthemereview:dev-develop dealerdirect/phpcodesniffer-composer-installer:^0.4.4

This will install the develop branch of the WPThemeReview standards as well as composer plugin that will register all the standards with PHPCS. After that you can run

vendor/bin/phpcs -i

You should see

The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1, PSR12, PHPCompatibility, PHPCompatibilityParagonieRandomCompat, PHPCompatibilityParagonieSodiumCompat, PHPCompatibilityWP, WordPress, WordPress-Extra, WordPress-Docs, WordPress-Core and WPThemeReview

Then just run

vendor/bin/phpcs -p . --standard=WPThemeReview

You should see something like this


WW...W.W.....W......WWW.WW.W.WW.WW.....WEEEEEEEEEEEEEEWEEEEE   60 / 1197 (5%)
EEWEEEWEEEEEEEEEWEWEEEEEEEEEEEEEEEEEEEEEEEE.EEEEEEEEEEEEEEEE  120 / 1197 (10%)
E.E..EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  180 / 1197 (15%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  240 / 1197 (20%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEES  300 / 1197 (25%)
EESSEESEESSSEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE  360 / 1197 (30%)
EEEEEEEEEEEEEEEEEEEEEWEEEE.EEEEEEE.EEEEEEEEEEEEEE.EEEEEEEEEE  420 / 1197 (35%)
EEEEEEEEEWEWWWEEEEWEEEE.EEEEEEEEEEEEEEEEEEEEEEEEEEEE.......W  480 / 1197 (40%)
W..WEWE.EEEEEEEEEEEEEEEEEEEE.E.EEWE..EWEEWEEEEW.EEWEWEEEEEEE  540 / 1197 (45%)
EEEEEEEEEEEEEEWEE.EWEE.EEEEE..EEEEEEEEEEEWEEEEEE.WEWEEEEE.E.  600 / 1197 (50%)
WWEEEEEEEEEE.E.EEEEEEEEE.E..EEEE..EE.E.EEE.EE.E.EEE..E.EEEEE  660 / 1197 (55%)
EEEEEEEEEE.EEEEEEE.W.EEEEEE..E.E..EEE.EEEEEWEE.EW..EWEEWWEEE  720 / 1197 (60%)
E.E..EEW..EEEEEEEEEEEEEEEEEE.EE.E.EEEEEEEEEEEEEEEEEEEEEEEEEE  780 / 1197 (65%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.WEWE.EEEE  840 / 1197 (70%)
EE..EE.E.EE..EE...EE...E..EEE..EE.EEE.EEEEEEEE.EEE.EE.EEEEEE  900 / 1197 (75%)
EEEEEE.EEEEEEEEEEEEEEEEEWEWE..EEEE.EEEEEEE...EEE..EE.EEEEEEE  960 / 1197 (80%)
EEEWEEEEEEE.EEEE.EEWEE.EEEEEEWWWEEEEEEEEEEE.EEEEE.EEEEEEEEEE 1020 / 1197 (85%)
EEEEEEEE.EEEE.E..E.EEWEE.EE.EEEE.EEEEEEEE..EEEEEEEEEEEEEEEEE 1080 / 1197 (90%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 1140 / 1197 (95%)
EEEEEEEEEEEEEEEEEEEEEEE.EE.....E.E.WEE.EEEEEEEEEEEE.EEEEE    1197 / 1197 (100%)



FILE: public_html/wp-content/themes/twentynineteen/functions.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 273 | WARNING | All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$primary_color'.
 274 | WARNING | All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found
     |         | 'twentynineteen_custom_colors_css'.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
...

If you find any errors or problems with setup feel free to report the issue on the Github or here in the comments.

#coding-standards, #wpthemereview

WP Rig at WCUS Contributor Day

At WordCamp Europe earlier this year, the new starter theme WP Rig (GitHub project) was introduced to the WordPress ecosystem. Since then, it has successfully transitioned into a community-driven effort, with several contributors of different backgrounds contributing back to it and improving the initial release significantly. Now that there is version 2.0 on the horizon, we want to ensure we can take it to the next level, streamlining development of progressive web experiences in WordPress while addressing the needs of the theme developer space.

WP Rig is a modern starter theme that focuses on accessibility, best practices, and performance. It puts progressive web technologies at the hands of theme developers, taking care of the heavy lifting so theme developers can focus on what’s most important – designing beautiful and user-friendly WordPress themes. At the same time, WP Rig is all about customizability: It works well out of the box, but you can dive in deeper and tweak its behavior if you prefer.

Among the features it provides are lazy-loading images, full touch, mouse and keyboard accessibility, a performance-optimized approach for enqueueing scripts and stylesheets, native support of PWA features and AMP via the respective plugins, and a modern and efficient development and production build workflow. And while WP Rig aims at modernizing the WordPress theme space, it does so in the WordPress way as much as possible. This makes for an easier transition from more traditional theme development. Furthermore, WP Rig is built in a way that allows you as a theme developer to keep your custom themes updated: You will always be able to pull in the latest improvements to the starter theme even as your theme diverges from it.

In order to make WP Rig a long-term success, it needs feedback, contributions and real-world usage from the wider WordPress community. That’s why at WordCamp US contributor day this weekend there will be a dedicated table to move this forward, as a subgroup of the Themes team. We plan to provide introductions to the starter theme’s features and workflow, and then we would like to discuss about its current status. Hopefully we can even get some code committed. If you are interested in learning more about WP Rig and shaping it for the future of WordPress theme development, please join the WP Rig table this weekend in Nashville.

#progressive, #wcus, #wprig

TRT Projects

Theme review team is perceived as only managing the theme reviews (like the name suggests), but we are also involved with some other open source and internal projects.

To easily manage and seeing them through, we’ve created a spreadsheet of all our projects and to do lists (credits go to @dingo_bastard).
We would like your opinion on the items presented in this document. You can find it here.

In the first sheet there is a list of agendas and projects that theme review team is managing, the second sheet has a list of maintainers – basically anyone who wants to contribute can add their name on the list. The third sheet is a list of suggestions – here you can pick a project and leave comments, what can be done, improved etc. and the last is just a project status column with a statistics count.

So, if you are interested in contributing or have an opinion, please leave a comment.

October 23rd Theme Review Team Meeting Summary

Child Themes

The decision is that themes must have certain uniqueness to be allowed in the repository, voted 10 yea and 1 nay.

More details here.

Team Lead Selection

Unfortunately, there was no official decision about this topic.

Theme Readme

The decision is that themes will use the same readme.txt format as plugins.

More details here.

Removing the “Review a Theme” button

The button will be removed, voted 6 yea and 1 nay. To review a theme from now on, just show up in Slack, say hi, and ask for a theme to review. (Or go the Trac ticket and assign yourself as a reviewer. Preferably the oldest open one.)

Discuss the TwentyNineteen issue

Attendants agreed with the comments in the GitHub Pull Request.

GitHub Pull Request.

Wrap-up for on-boarding discussion

On-boarding will be allowed for few months, with some specific rules. Handbook will be updated with specifics.

More details here.

Attendance

@acosmin, @andre-jutras, @azexo, @azexo, @benlumia007, @bothera, @conlaccento, @cristianozanca, @dannycooper, @dingdang, @dingo_bastard, @greenshady, @imranaliweb, @jcastaneda, @joyously, @kafleg, @kevinhaig, @lamarajan, @luehrsen, @marcio-zebedeu, @nikschavan, @otto42, @poena, @rabmalin, @santoshraut, @sharaz, @themeansar, @thinkupthemes, @williampatton, and Charlie Livingston.

Read the meeting transcript in the Slack archives. (A Slack account is required)

Theme Review Team Meeting Agenda – 23rd October 2018

This week we have a few items on the agenda to chat about. These are open discussion items, let’s hear your thoughts about them.

  1. Child Themes – minimum requirements to constitute a viable change, submission limitations for them in the queue and for TA program.
  2. Team Lead Selection – let’s talk about how leads are chosen, how we can choose going forward and what benefits we can get from open selection.
  3. Theme Readme – can we standardise on a single Readme format for themes to use going forward? What do we want in this, what fields are already required, when should we start asking authors include the decided format?
  4. Removing the Review a Theme button. (@poena request)
  5. Discuss this Twentynineteen issue. (@poena request)
  6. Wrap-up for on-boarding discussion.