Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Biggest WP Core Patch Ever

The Biggest WP Core Patch Ever

Presented on September 2, 2017 at WordCamp Nijmegen, Nijmegen, The Netherlands.
https://2017.nijmegen.wordcamp.org/
---------------------------------------------------------------
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 trac ticket 41057 and how we created the biggest patch to go into WordPress core ever. …

Juliette Reinders Folmer

September 02, 2017
Tweet

More Decks by Juliette Reinders Folmer

Other Decks in Programming

Transcript

  1. Why is Code Style Important ? Easier to maintain &

    debug Easier to start contributing Easier to comprehend
  2. 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
  3. 179 Unique Error Codes Top 10 Error Sources: 1. PEAR.Functions.FunctionCallSignature

    2. Generic.ControlStructures.InlineControl Structure 3. Generic.WhiteSpace.ScopeIndent 4. WordPress.Arrays.ArrayDeclarationSpacing 5. WordPress.WhiteSpace.OperatorSpacing 6. WordPress.Arrays.ArrayKeySpacing Restrictions 7. WordPress.Arrays.CommaAfterArrayItem 8. Squiz.Strings.DoubleQuoteUsage 9. WordPress.Arrays.ArrayIndentation 10.Squiz.PHP.DisallowMultipleAssignments
  4. Here Be Dragons Fixer Conflicts Badly set up Sniffs Bugs

    in Sniffs and Fixers Missing Sniffs
  5. Wins  More comprehensive WP Coding Standards  Better sniffs

    in both WPCS + PHPCS  Better code Steven Lilley
  6. The Team Stephen Edgar Gary Pendergast Juliette Reinders Folmer Weston

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