SlideShare a Scribd company logo
CODE REVIEW
WORDCAMP ST. LOUIS 2016
RYAN MARKEL
HELLO, WORLD!
CODE REVIEW
ABOUT ME
▸ I’m a (really) long-time WordPress user.
▸ I work at Automattic.
▸ On the WordPress.com VIP team.
▸ I can (kind of) code.
▸ With some help.
▸ On a good day.
OK; SO WHY DO YOU CARE SO
MUCH ABOUT CODE REVIEW?
AND WHY SHOULD I?
All of you, just now
CODE REVIEW
CODE REVIEW IS A
WAY OF LIFE
WHAT IS
WORDPRESS.COM VIP?
DIGRESSION:
CODE REVIEW
WORDPRESS.COM
▸ Largest single WordPress installation in the world
▸ Serving:
▸ 21.5 billion page views per month
▸ 55.8 million new posts per month
▸ Many millions of sites/blogs
CODE REVIEW
WORDPRESS.COM VIP
▸ Enterprise-level WordPress hosting
▸ On the WordPress.com infrastructure
▸ 2.5 billion page views per month
▸ 99.9976% uptime
▸ 349ms average response time
CODE REVIEW
WORDPRESS.COM VIP
▸ Sites run on WordPress.com sites, just like yours and mine
▸ Clients have a custom svn repository for their theme
▸ They commit changes to their theme directly to their
directory on WordPress.com
▸ A problem with a WordPress.com VIP site can affect:
▸ Other VIP sites
▸ More of the WordPress.com network
WE REVIEW ALL CODE
BEFORE DEPLOYING IT
WHY CODE REVIEW?
1.
CODE REVIEW
WHY CODE REVIEW?
▸ Safe code
▸ Finding XSS, unescaped and unsanitized code
▸ Scalable code
▸ Smart queries, cached functions, DRY code
▸ Readable code
▸ Coding standards (whitespace, formatting, etc.)
▸ Learning!
WE DON’T […] REVIEW TO
ADD MORE TIME TO OR DELAY
YOUR LAUNCH SCHEDULES.
WordPress.com VIP
CODE REVIEW
WE DO […] CODE REVIEWS
TO HELP YOU LAUNCH
SUCCESSFULLY.
WordPress.com VIP
CODE REVIEW
WHAT DO YOU LOOK FOR
WHEN YOU REVIEW CODE?
2.
CODE REVIEW
WHAT DO YOU LOOK FOR WHEN YOU REVIEW CODE?
▸ Validation, sanitizing, and escaping
▸ XSS in Javascript
▸ Uncached WordPress functions
▸ Smart fetching of remote data
▸ Terrifying queries that set databases on fire
▸ Best practices and WordPress coding standards
▸ Typos
HOW DO YOU DO CODE
REVIEW?
3.
AUTOMATIC CODE
REVIEW
CODE REVIEW
AUTOMATIC CODE REVIEW
▸ PHP CodeSniffer
▸ WordPress Coding Standards rules
▸ VIP Quickstart and/or VIP Scanner
▸ Continuous integration testing
▸ e.g., Travis
▸ WP Enforcer
MANUAL CODE
REVIEW
THE WORDPRESS.COM VIP
CODE REVIEW PROCESS
DIGRESSION:
THE “DEPLOY
QUEUE”
(REDACTED)
CODE REVIEW
WORDPRESS.COM VIP CODE REVIEW PROCESS
▸ Client commits changes to repository
▸ Changeset displayed in a special view that contains:
▸ Commit itself (diff, revision #, repository data, etc.)
▸ Changelog entry for each revision
▸ Reviewer can either:
▸ Open a ticket to discuss the change and leave notes
▸ Deploy or revert as needed
CODE REVIEW
WORDPRESS.COM VIP CODE REVIEW PROCESS
▸ 9.5 million lines of code reviewed to date
▸ Over 144 thousand individual deploys
▸ Average time from commit to deploy (this includes
review!) is around two hours
THAT’S COOL, BUT WHAT
TOOLS CAN I USE TO
ACCOMPLISH THE SAME?
You, just now again
CODE REVIEW
DO YOU USE
GITHUB?
PULL REQUESTS ARE LIKE
BUILT-IN CODE REVIEW
OPPORTUNITIES
CALYPSO
DIGRESSION:
[CODE REVIEWS] HELP TO
KEEP CODE QUALITY
CONSISTENT,
Calypso Project Documentation
CODE REVIEW
THEY SPREAD OWNERSHIP OF
THE CODE,
Calypso Project Documentation
CODE REVIEW
AND THEY HELP EVERY
PERSON WORKING ON
CALYPSO IMPROVE OVER TIME.
Calypso Project Documentation
CODE REVIEW
CODE REVIEW
CALYPSO
▸ Pull requests are peer reviews waiting to happen
▸ Stay positive - comment on the code, not the person
▸ Have a list of things to look for in code review
▸ Checklists are your friends
▸ When you are creating a pull request
▸ When you are reviewing and (hopefully) merging it
YOU NEED
DOCUMENTATION
CODE REVIEW […] GREATLY
INCREASED THE QUALITY OF
OUR CODEBASE…
Andy Peatling, WordPress.com Developer Blog
CODE REVIEW
…AND HELPED EVERYONE
LEVEL UP THEIR JAVASCRIPT
SKILLS.
Andy Peatling, WordPress.com Developer Blog
CODE REVIEW
WAYS TO DO MANUAL
CODE REVIEW
CODE REVIEW
MANUAL CODE REVIEW
▸ Github pull requests
▸ No one merges their own PR
▸ Use the comments! They are a great tool!
▸ Line number comments are fantastic
▸ If you don’t use Github or a similar tool
▸ Diff reviews (use a good text editor) - WordPress core!
MAKE IT PART OF
YOUR TEAM CULTURE
WHAT IF I’M A SOLO
DEVELOPER? WHAT DO I DO?
A few of you, maybe for the last few minutes
CODE REVIEW
SLEEP ON YOUR
CODE
CODE REVIEW
SELF CODE-REVIEW
▸ Create pull requests or diffs of your own code and queue
them up for review
▸ Don’t merge to master/production/head the same day if
you can help it
▸ Clear your mental context between writing your code and
reviewing your own code
▸ Use automatic code review tools to get you part of the way
there
EVERYONE CAN
DO CODE REVIEW
WHEN NOT TO DO CODE
REVIEW
4.
NEVER
REVIEWED CODE
IS BETTER CODE
THANK YOU
WORDCAMP ST. LOUIS 2016
NO, REALLY; THANK YOU
RYANMARKEL.COM/WCSTL2016
▸ Download of these slides and my
notes
▸ Links to the resources listed and
quoted in this presentation
▸ Contact form so you can reach me
if you have any questions
▸ Lots of blog posts that have
nothing to do with code review,
this talk, or really WordPress at all

More Related Content

What's hot

WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017
WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017
WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017
Bhushan Jawle
 
The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)
Todd Ross Nienkerk
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
Josh Williams
 
Making websites with WordPress
Making websites with WordPressMaking websites with WordPress
Making websites with WordPress
Josh Lee
 
Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16
tshellberg
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
Josh Lee
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
Morten Rand-Hendriksen
 
How to Build Custom WordPress Blocks
How to Build Custom WordPress BlocksHow to Build Custom WordPress Blocks
How to Build Custom WordPress Blocks
Morten Rand-Hendriksen
 
Word press development for non developers
Word press development for non developers Word press development for non developers
Word press development for non developers
Jessica C. Gardner
 
Wordpress as a Backend
Wordpress as a BackendWordpress as a Backend
Wordpress as a Backend
Andrew Duthie
 
WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)
alexkingorg
 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshop
Jonny Allbut
 
Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.js
Josh Lee
 
Websites for Hackers
Websites for HackersWebsites for Hackers
Websites for Hackers
Chris Antes
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme development
Jonny Allbut
 
Blazor - An Introduction
Blazor - An IntroductionBlazor - An Introduction
Blazor - An Introduction
JamieTaylor112
 
Plugins Spectacular WordCamp Sydney 2012
Plugins Spectacular WordCamp Sydney 2012Plugins Spectacular WordCamp Sydney 2012
Plugins Spectacular WordCamp Sydney 2012
Tony Cosentino
 
Better WordPress Theme Development Workflow
Better WordPress Theme Development WorkflowBetter WordPress Theme Development Workflow
Better WordPress Theme Development Workflow
Rajeeb Banstola
 
Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS Application
Hengki Sihombing
 
Building node.js Modules
Building node.js ModulesBuilding node.js Modules
Building node.js Modules
Kevin Griffin
 

What's hot (20)

WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017
WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017
WordPress Security : What We Learnt When We Were Hacked : WordCamp Mumbai 2017
 
The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)The Future of-the CMS (Twin Cities DrupalCamp 2015)
The Future of-the CMS (Twin Cities DrupalCamp 2015)
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
 
Making websites with WordPress
Making websites with WordPressMaking websites with WordPress
Making websites with WordPress
 
Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16Nürnberg WooCommerce Talk - 11/24/16
Nürnberg WooCommerce Talk - 11/24/16
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
 
How to Build Custom WordPress Blocks
How to Build Custom WordPress BlocksHow to Build Custom WordPress Blocks
How to Build Custom WordPress Blocks
 
Word press development for non developers
Word press development for non developers Word press development for non developers
Word press development for non developers
 
Wordpress as a Backend
Wordpress as a BackendWordpress as a Backend
Wordpress as a Backend
 
WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)
 
WordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshopWordCamp Birmingham 2015 - Theme building workshop
WordCamp Birmingham 2015 - Theme building workshop
 
Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.js
 
Websites for Hackers
Websites for HackersWebsites for Hackers
Websites for Hackers
 
Rapid WordPress theme development
Rapid WordPress theme developmentRapid WordPress theme development
Rapid WordPress theme development
 
Blazor - An Introduction
Blazor - An IntroductionBlazor - An Introduction
Blazor - An Introduction
 
Plugins Spectacular WordCamp Sydney 2012
Plugins Spectacular WordCamp Sydney 2012Plugins Spectacular WordCamp Sydney 2012
Plugins Spectacular WordCamp Sydney 2012
 
Better WordPress Theme Development Workflow
Better WordPress Theme Development WorkflowBetter WordPress Theme Development Workflow
Better WordPress Theme Development Workflow
 
Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS Application
 
Building node.js Modules
Building node.js ModulesBuilding node.js Modules
Building node.js Modules
 

Viewers also liked

How to Make the Most out of Yoast SEO
How to Make the Most out of Yoast SEOHow to Make the Most out of Yoast SEO
How to Make the Most out of Yoast SEO
Nile Flores
 
Getting to Know Underscores
Getting to Know Underscores Getting to Know Underscores
Getting to Know Underscores
Jason Yingling
 
Teresa Lane - Content Modeling - WordCamp St. Louis 2016
Teresa Lane - Content Modeling - WordCamp St. Louis 2016Teresa Lane - Content Modeling - WordCamp St. Louis 2016
Teresa Lane - Content Modeling - WordCamp St. Louis 2016
Teresa Lane
 
Building a Simple Project Plan for WordPress Projects
Building a Simple Project Plan for WordPress ProjectsBuilding a Simple Project Plan for WordPress Projects
Building a Simple Project Plan for WordPress Projects
Lucas Lima
 
Passwords, Attakcks, and Security, oh my!
Passwords, Attakcks, and Security, oh my!Passwords, Attakcks, and Security, oh my!
Passwords, Attakcks, and Security, oh my!
Michele Butcher
 
Automating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with GulpAutomating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with Gulp
Mike Hale
 
Code Review
Code ReviewCode Review
Code Review
Tu Hoang
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
Matt Wiebe
 
Ithemes presentation
Ithemes presentationIthemes presentation
Ithemes presentation
Jason Yingling
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sites
Jason Yingling
 
Managing_WordPress_Projects_wcstl 2015_Lucas_Lima
Managing_WordPress_Projects_wcstl 2015_Lucas_LimaManaging_WordPress_Projects_wcstl 2015_Lucas_Lima
Managing_WordPress_Projects_wcstl 2015_Lucas_Lima
Lucas Lima
 
Code Review
Code ReviewCode Review
Code ReviewRavi Raj
 
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Andrew Duthie
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
Nile Flores
 
Core plugins - WordCamp UK 2010
Core plugins  - WordCamp UK 2010Core plugins  - WordCamp UK 2010
Core plugins - WordCamp UK 2010
Peter Westwood
 
Wordcamp 2010 I'm A Scientist Get me Out of Here - Mike Little
Wordcamp 2010 I'm A Scientist Get me Out of Here - Mike LittleWordcamp 2010 I'm A Scientist Get me Out of Here - Mike Little
Wordcamp 2010 I'm A Scientist Get me Out of Here - Mike Little
Mike Little
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
mdawaffe
 
WordPress as a Service
WordPress as a ServiceWordPress as a Service
WordPress as a Service
Andrew Bauer
 
Empowering Your Clients and Be an Advocate for Yourself
Empowering Your Clients and Be an Advocate for YourselfEmpowering Your Clients and Be an Advocate for Yourself
Empowering Your Clients and Be an Advocate for Yourself
Linchpin
 
Comunidade. Abuse e use dela com moderação e inteligência.
Comunidade. Abuse e use dela com moderação e inteligência.Comunidade. Abuse e use dela com moderação e inteligência.
Comunidade. Abuse e use dela com moderação e inteligência.
Beto Muniz
 

Viewers also liked (20)

How to Make the Most out of Yoast SEO
How to Make the Most out of Yoast SEOHow to Make the Most out of Yoast SEO
How to Make the Most out of Yoast SEO
 
Getting to Know Underscores
Getting to Know Underscores Getting to Know Underscores
Getting to Know Underscores
 
Teresa Lane - Content Modeling - WordCamp St. Louis 2016
Teresa Lane - Content Modeling - WordCamp St. Louis 2016Teresa Lane - Content Modeling - WordCamp St. Louis 2016
Teresa Lane - Content Modeling - WordCamp St. Louis 2016
 
Building a Simple Project Plan for WordPress Projects
Building a Simple Project Plan for WordPress ProjectsBuilding a Simple Project Plan for WordPress Projects
Building a Simple Project Plan for WordPress Projects
 
Passwords, Attakcks, and Security, oh my!
Passwords, Attakcks, and Security, oh my!Passwords, Attakcks, and Security, oh my!
Passwords, Attakcks, and Security, oh my!
 
Automating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with GulpAutomating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with Gulp
 
Code Review
Code ReviewCode Review
Code Review
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
 
Ithemes presentation
Ithemes presentationIthemes presentation
Ithemes presentation
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sites
 
Managing_WordPress_Projects_wcstl 2015_Lucas_Lima
Managing_WordPress_Projects_wcstl 2015_Lucas_LimaManaging_WordPress_Projects_wcstl 2015_Lucas_Lima
Managing_WordPress_Projects_wcstl 2015_Lucas_Lima
 
Code Review
Code ReviewCode Review
Code Review
 
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
 
Core plugins - WordCamp UK 2010
Core plugins  - WordCamp UK 2010Core plugins  - WordCamp UK 2010
Core plugins - WordCamp UK 2010
 
Wordcamp 2010 I'm A Scientist Get me Out of Here - Mike Little
Wordcamp 2010 I'm A Scientist Get me Out of Here - Mike LittleWordcamp 2010 I'm A Scientist Get me Out of Here - Mike Little
Wordcamp 2010 I'm A Scientist Get me Out of Here - Mike Little
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
WordPress as a Service
WordPress as a ServiceWordPress as a Service
WordPress as a Service
 
Empowering Your Clients and Be an Advocate for Yourself
Empowering Your Clients and Be an Advocate for YourselfEmpowering Your Clients and Be an Advocate for Yourself
Empowering Your Clients and Be an Advocate for Yourself
 
Comunidade. Abuse e use dela com moderação e inteligência.
Comunidade. Abuse e use dela com moderação e inteligência.Comunidade. Abuse e use dela com moderação e inteligência.
Comunidade. Abuse e use dela com moderação e inteligência.
 

Similar to Ryan Markel - WordCamp StL 2016 - Code Review

WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)
WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)
WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)
Geoff Myers
 
Code reviews
Code reviewsCode reviews
Code reviews
Raúl Araya Tauler
 
Do WordPress developers write code?
Do WordPress developers write code?Do WordPress developers write code?
Do WordPress developers write code?
Stanko Metodiev
 
20 Tips to Improving WordPress Website - for Beginners-Aus-2017
20 Tips to Improving WordPress Website - for Beginners-Aus-201720 Tips to Improving WordPress Website - for Beginners-Aus-2017
20 Tips to Improving WordPress Website - for Beginners-Aus-2017
TRB Design, Inc.
 
WordPress: After The Install
WordPress: After The InstallWordPress: After The Install
WordPress: After The Install
WordPress NYC
 
Drivetribe: A Social Network on Streams
Drivetribe: A Social Network on StreamsDrivetribe: A Social Network on Streams
Drivetribe: A Social Network on Streams
C4Media
 
Delivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-CodeDelivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-Code
Cyber-Duck
 
WordPress for Beginners | WordCamp Birmingham
WordPress for Beginners | WordCamp BirminghamWordPress for Beginners | WordCamp Birmingham
WordPress for Beginners | WordCamp Birmingham
Brian Krogsgard
 
Impact of CD, Clean Code, ... on Team Performance
Impact of CD, Clean Code, ... on Team PerformanceImpact of CD, Clean Code, ... on Team Performance
Impact of CD, Clean Code, ... on Team Performance
Fredrik Wendt
 
How to create a WordPress Site
How to create a WordPress Site How to create a WordPress Site
How to create a WordPress Site
MuhammadUsaid2
 
Word press in 30 minutes
Word press in 30 minutesWord press in 30 minutes
Word press in 30 minutes
Michelle Castillo
 
Software Project Management project on WordPress
Software Project Management project on WordPressSoftware Project Management project on WordPress
Software Project Management project on WordPress
Rajesh ilango
 
Contributing to WordPress
Contributing to WordPressContributing to WordPress
Contributing to WordPress
Courtney OCallaghan
 
Flink Forward San Francisco 2018: Aris Koliopoulos & Alex Garella - "Panta R...
Flink Forward San Francisco 2018:  Aris Koliopoulos & Alex Garella - "Panta R...Flink Forward San Francisco 2018:  Aris Koliopoulos & Alex Garella - "Panta R...
Flink Forward San Francisco 2018: Aris Koliopoulos & Alex Garella - "Panta R...
Flink Forward
 
Word camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for BeginnersWord camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for Beginners
Convinsys
 
UCSY CS Club Week1
UCSY CS Club Week1UCSY CS Club Week1
UCSY CS Club Week1
Ye Linn Wai
 
Get Involved! Contributing to the WordPress Community
Get Involved! Contributing to the WordPress CommunityGet Involved! Contributing to the WordPress Community
Get Involved! Contributing to the WordPress Community
Courtney OCallaghan
 

Similar to Ryan Markel - WordCamp StL 2016 - Code Review (20)

WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)
WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)
WordPress Page Builders for Non-Developers (Create Visual Layouts Without Code)
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Do WordPress developers write code?
Do WordPress developers write code?Do WordPress developers write code?
Do WordPress developers write code?
 
20 Tips to Improving WordPress Website - for Beginners-Aus-2017
20 Tips to Improving WordPress Website - for Beginners-Aus-201720 Tips to Improving WordPress Website - for Beginners-Aus-2017
20 Tips to Improving WordPress Website - for Beginners-Aus-2017
 
WordPress: After The Install
WordPress: After The InstallWordPress: After The Install
WordPress: After The Install
 
Drivetribe: A Social Network on Streams
Drivetribe: A Social Network on StreamsDrivetribe: A Social Network on Streams
Drivetribe: A Social Network on Streams
 
RWD
RWDRWD
RWD
 
Delivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-CodeDelivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-Code
 
WordPress for Beginners | WordCamp Birmingham
WordPress for Beginners | WordCamp BirminghamWordPress for Beginners | WordCamp Birmingham
WordPress for Beginners | WordCamp Birmingham
 
Impact of CD, Clean Code, ... on Team Performance
Impact of CD, Clean Code, ... on Team PerformanceImpact of CD, Clean Code, ... on Team Performance
Impact of CD, Clean Code, ... on Team Performance
 
How to create a WordPress Site
How to create a WordPress Site How to create a WordPress Site
How to create a WordPress Site
 
Word press in 30 minutes
Word press in 30 minutesWord press in 30 minutes
Word press in 30 minutes
 
Software Project Management project on WordPress
Software Project Management project on WordPressSoftware Project Management project on WordPress
Software Project Management project on WordPress
 
Contributing to WordPress
Contributing to WordPressContributing to WordPress
Contributing to WordPress
 
Flink Forward San Francisco 2018: Aris Koliopoulos & Alex Garella - "Panta R...
Flink Forward San Francisco 2018:  Aris Koliopoulos & Alex Garella - "Panta R...Flink Forward San Francisco 2018:  Aris Koliopoulos & Alex Garella - "Panta R...
Flink Forward San Francisco 2018: Aris Koliopoulos & Alex Garella - "Panta R...
 
WordPress 101
WordPress 101WordPress 101
WordPress 101
 
Word camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for BeginnersWord camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for Beginners
 
UCSY CS Club Week1
UCSY CS Club Week1UCSY CS Club Week1
UCSY CS Club Week1
 
Get Involved! Contributing to the WordPress Community
Get Involved! Contributing to the WordPress CommunityGet Involved! Contributing to the WordPress Community
Get Involved! Contributing to the WordPress Community
 
World of WordPress
World of WordPressWorld of WordPress
World of WordPress
 

Recently uploaded

Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
uehowe
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 

Recently uploaded (20)

Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 

Ryan Markel - WordCamp StL 2016 - Code Review

  • 3. CODE REVIEW ABOUT ME ▸ I’m a (really) long-time WordPress user. ▸ I work at Automattic. ▸ On the WordPress.com VIP team. ▸ I can (kind of) code. ▸ With some help. ▸ On a good day.
  • 4. OK; SO WHY DO YOU CARE SO MUCH ABOUT CODE REVIEW? AND WHY SHOULD I? All of you, just now CODE REVIEW
  • 5.
  • 6. CODE REVIEW IS A WAY OF LIFE
  • 8.
  • 9. CODE REVIEW WORDPRESS.COM ▸ Largest single WordPress installation in the world ▸ Serving: ▸ 21.5 billion page views per month ▸ 55.8 million new posts per month ▸ Many millions of sites/blogs
  • 10. CODE REVIEW WORDPRESS.COM VIP ▸ Enterprise-level WordPress hosting ▸ On the WordPress.com infrastructure ▸ 2.5 billion page views per month ▸ 99.9976% uptime ▸ 349ms average response time
  • 11.
  • 12. CODE REVIEW WORDPRESS.COM VIP ▸ Sites run on WordPress.com sites, just like yours and mine ▸ Clients have a custom svn repository for their theme ▸ They commit changes to their theme directly to their directory on WordPress.com ▸ A problem with a WordPress.com VIP site can affect: ▸ Other VIP sites ▸ More of the WordPress.com network
  • 13. WE REVIEW ALL CODE BEFORE DEPLOYING IT
  • 15. CODE REVIEW WHY CODE REVIEW? ▸ Safe code ▸ Finding XSS, unescaped and unsanitized code ▸ Scalable code ▸ Smart queries, cached functions, DRY code ▸ Readable code ▸ Coding standards (whitespace, formatting, etc.) ▸ Learning!
  • 16. WE DON’T […] REVIEW TO ADD MORE TIME TO OR DELAY YOUR LAUNCH SCHEDULES. WordPress.com VIP CODE REVIEW
  • 17. WE DO […] CODE REVIEWS TO HELP YOU LAUNCH SUCCESSFULLY. WordPress.com VIP CODE REVIEW
  • 18. WHAT DO YOU LOOK FOR WHEN YOU REVIEW CODE? 2.
  • 19. CODE REVIEW WHAT DO YOU LOOK FOR WHEN YOU REVIEW CODE? ▸ Validation, sanitizing, and escaping ▸ XSS in Javascript ▸ Uncached WordPress functions ▸ Smart fetching of remote data ▸ Terrifying queries that set databases on fire ▸ Best practices and WordPress coding standards ▸ Typos
  • 20. HOW DO YOU DO CODE REVIEW? 3.
  • 22. CODE REVIEW AUTOMATIC CODE REVIEW ▸ PHP CodeSniffer ▸ WordPress Coding Standards rules ▸ VIP Quickstart and/or VIP Scanner ▸ Continuous integration testing ▸ e.g., Travis ▸ WP Enforcer
  • 24. THE WORDPRESS.COM VIP CODE REVIEW PROCESS DIGRESSION:
  • 25.
  • 28. CODE REVIEW WORDPRESS.COM VIP CODE REVIEW PROCESS ▸ Client commits changes to repository ▸ Changeset displayed in a special view that contains: ▸ Commit itself (diff, revision #, repository data, etc.) ▸ Changelog entry for each revision ▸ Reviewer can either: ▸ Open a ticket to discuss the change and leave notes ▸ Deploy or revert as needed
  • 29. CODE REVIEW WORDPRESS.COM VIP CODE REVIEW PROCESS ▸ 9.5 million lines of code reviewed to date ▸ Over 144 thousand individual deploys ▸ Average time from commit to deploy (this includes review!) is around two hours
  • 30. THAT’S COOL, BUT WHAT TOOLS CAN I USE TO ACCOMPLISH THE SAME? You, just now again CODE REVIEW
  • 32.
  • 33.
  • 34. PULL REQUESTS ARE LIKE BUILT-IN CODE REVIEW OPPORTUNITIES
  • 36.
  • 37. [CODE REVIEWS] HELP TO KEEP CODE QUALITY CONSISTENT, Calypso Project Documentation CODE REVIEW
  • 38. THEY SPREAD OWNERSHIP OF THE CODE, Calypso Project Documentation CODE REVIEW
  • 39. AND THEY HELP EVERY PERSON WORKING ON CALYPSO IMPROVE OVER TIME. Calypso Project Documentation CODE REVIEW
  • 40. CODE REVIEW CALYPSO ▸ Pull requests are peer reviews waiting to happen ▸ Stay positive - comment on the code, not the person ▸ Have a list of things to look for in code review ▸ Checklists are your friends ▸ When you are creating a pull request ▸ When you are reviewing and (hopefully) merging it
  • 42. CODE REVIEW […] GREATLY INCREASED THE QUALITY OF OUR CODEBASE… Andy Peatling, WordPress.com Developer Blog CODE REVIEW
  • 43. …AND HELPED EVERYONE LEVEL UP THEIR JAVASCRIPT SKILLS. Andy Peatling, WordPress.com Developer Blog CODE REVIEW
  • 44. WAYS TO DO MANUAL CODE REVIEW
  • 45. CODE REVIEW MANUAL CODE REVIEW ▸ Github pull requests ▸ No one merges their own PR ▸ Use the comments! They are a great tool! ▸ Line number comments are fantastic ▸ If you don’t use Github or a similar tool ▸ Diff reviews (use a good text editor) - WordPress core!
  • 46. MAKE IT PART OF YOUR TEAM CULTURE
  • 47. WHAT IF I’M A SOLO DEVELOPER? WHAT DO I DO? A few of you, maybe for the last few minutes CODE REVIEW
  • 49. CODE REVIEW SELF CODE-REVIEW ▸ Create pull requests or diffs of your own code and queue them up for review ▸ Don’t merge to master/production/head the same day if you can help it ▸ Clear your mental context between writing your code and reviewing your own code ▸ Use automatic code review tools to get you part of the way there
  • 51. WHEN NOT TO DO CODE REVIEW 4.
  • 52. NEVER
  • 55. NO, REALLY; THANK YOU RYANMARKEL.COM/WCSTL2016 ▸ Download of these slides and my notes ▸ Links to the resources listed and quoted in this presentation ▸ Contact form so you can reach me if you have any questions ▸ Lots of blog posts that have nothing to do with code review, this talk, or really WordPress at all