The Biggest WP Core Patch Ever

The Biggest WP Core Patch Ever

Presented on September 30, 2017 at the unconference of the PHP North West Conference, Manchester, United Kingdom.
http://conference.phpnw.org.uk/phpnw17/
---------------------------------------------------------------
If you’re looking at the WordPress core code, you wouldn’t easily believe that WordPress actually has clear and consistent coding standards.
While the standards are in the Core developers handbook, most of the WordPress code base does not comply and patches to fix this were not being accepted.

Until now.

So let me tell you a little story about how we created the biggest patch to go into WordPress core ever. …

2776198ea9584b6c0d4b494293b8d635?s=128

Juliette Reinders Folmer

September 30, 2017
Tweet

Transcript

  1. 2.
  2. 4.

    Why is Code Style Important ? Easier to maintain &

    debug Easier to start contributing Easier to comprehend
  3. 5.

    Evolution of the WordPress Code Base 0 50 100 150

    200 250 300 350 400 25-7-2012 1-7-2013 1-7-2014 1-7-2015 1-7-2016 1-7-2017 x 1.000 Lines of Code (ex comments) Clean Code
  4. 6.
  5. 7.
  6. 13.

    189 Unique Error Codes Top 10 Error Sources: 1. PEAR.Functions.FunctionCallSignature

    2. WordPress.Arrays.MultipleStatement Alignment 3. Generic.ControlStructures.InlineControl Structure 4. Generic.WhiteSpace.ScopeIndent 5. WordPress.Arrays.ArrayDeclarationSpacing 6. WordPress.WhiteSpace.OperatorSpacing 7. WordPress.Arrays.ArrayKeySpacing Restrictions 8. WordPress.Arrays.CommaAfterArrayItem 9. Squiz.Strings.DoubleQuoteUsage 10.WordPress.Arrays.ArrayIndentation
  7. 14.

    Here Be Dragons Fixer Conflicts Badly set up Sniffs Bugs

    in Sniffs and Fixers Missing Sniffs
  8. 15.

    Wins  More comprehensive WP Coding Standards  Better sniffs

    in both WPCS + PHPCS  Better code Steven Lilley
  9. 19.

    The Team Stephen Edgar Gary Pendergast Juliette Reinders Folmer Weston

    Ruter J.D. Grimes Gary Jones Core Team WPCS team Maybe you ?