Tips for productive development in WordPress

Tips for productive development in WordPress

I've taken this talk at Ahmedabad WordPress Meetup to explain how to be productive while doing WordPress development.
- Summary
- WordPress Coding Standards
- General Coding Standards
- PHP Coding Standards
- HTML Coding Standards
- CSS Coding Standards
- Javascript Coding Standards
- Security - Biggest Concern
- Optimize Website
- Productive Tools (My findings)

E416093f6de9259c696a94c9c4b310c6?s=128

Mehul Gohil

April 23, 2017
Tweet

Transcript

  1. TIPS FOR PRODUCTIVE DEVELOPMENT IN WORDPRESS Handcrafted with utmost care

    by Mehul Gohil
  2. SUMMARY ▪ WordPress Coding Standards – Mix it with blood

    ▪ Be at safer side with added security ▪ Lightweight & Optimized with fabulous speed ▪ Using Productive Tools for development
  3. WORDPRESS CODING STANDARDS ▪ Have you ever referred WordPress Coding

    Standards? ▪ 4 Types of coding standards provided by WordPress ▪ PHP ▪ HTML ▪ CSS ▪ JavaScript ▪ For more details, refer WordPress Coding Standards Guide
  4. GENERAL CODING STANDARDS ▪ Naming Conventions ▪ Always use braces

    for IF, FOR and Functions ▪ Prefer Yoda Conditions ▪ Proper Indentation and Commenting – Don’t Over Use ▪ Effective use of Single & Double Quotes ▪ Avoid Function & Variable Names Collisions
  5. PHP CODING STANDARDS ▪ Use elseif not else if ▪

    Never use PHP Shorthands ▪ Make sure you don’t have Trailing Spaces ▪ Formatting SQL Statements ▪ Ternary Operator – Test with Extra Care ▪ Never use @ and extract() ▪ Source: WordPress PHP Coding Standards
  6. HTML CODING STANDARDS ▪ Self Closing Elements ▪ Must Use

    Clever Attribution ▪ Source: WordPress HTML Coding Standards
  7. CSS CODING STANDARDS ▪ Proper Structuring ▪ Better Use of

    Selectors ▪ Effective use of CSS properties ▪ Improved use of Vendor Prefixes ▪ Use of WordPress defined CSS Classes ▪ Source: WordPress CSS Coding Standards
  8. JAVASCRIPT CODING STANDARDS ▪ Try to use OOPS concept ▪

    Multiline Statements – Use when necessary ▪ Give preference to Chained Method Calls ▪ Source: WordPress Javascript Coding Standards
  9. SECURITY – BIGGEST CONCERN ▪ Why to add security even

    WordPress is having its own Security? ▪ What are the reasons behind WordPress Sites getting hacked? ▪ Use of Predictable Passwords – 10 % Website Hacked ▪ Development of custom functionality in themes and plugins in an insecure way – 70% Website Hacked ▪ Use of Vulnerable Plugin – 22% Website Hacked ▪ Why do hackers target WordPress sites? ▪ How to harden security of WordPress sites? ▪ Follow WordPress Official Security Guide while going LIVE ▪ Use of Nonce for all custom forms ▪ Use of Sanitization functions for all the variables wherever necessary – Guide 1 and Guide 2 ▪ Replacing Default Salt Keys ▪ Use of plugins which are in active development mode
  10. OPTIMIZE WEBSITE ▪ Why to optimize? ▪ How to optimize?

    ▪ Best Standard to optimize – Google Page Speed ▪ Basic Understanding of Google Page Speed – Measurement & Calculations ▪ Points to work upon to optimize website ▪ Source: Google Page Speed - About
  11. PRODUCTIVE TOOLS – MY FINDINGS ▪ Base Theme ▪ Base

    Plugin ▪ How to divide functionality between Theme and Plugins?
  12. THAT’S ALL FROM MY END! Thank you so much Connect

    with me using ▪ Twitter: @mehul_gohil0810 ▪ GitHub: mehul0810 ▪ WordPress: mehul0810 ▪ Email: mehul.gohil0810@googlemail.com