Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
How to
Audit
Drupal
Sites
for performance, content

and best practices
about.me/jonpeck
2015.08.29 - DrupalCamp LA
Jon Peck
Senior Engineer at FourKitchens.com
@FluxSauce - github.com/fluxsauce - drupal.org/u/fluxsauce
What is an audit?
• official inspection of
accounts
• validate the good things
• highlight areas of
improvement
Why audit sites?
• Learn about contents and
structure
• Ensure optimal configuration
• Discover areas of improvement
Every site is unique, but…
• Built with the same
framework
• Similar architectural
requirements
• One size fits most
Effective auditing
• Consistent
• Quantifiable
• Contextually aware
• Easy to understand
• Actionable recommendations
Static program analysis
• Performance & behavior
gathering
• Does not execute
• Non-intrusive
• Automated
Tools for
Auditing
Yup, it’s wood.
Site Audit
• https://www.drupal.org/project/site_audit
• Drupal site analyzer
• Drush command on

target platform
• Report...
What does Site Audit check?
• Best Practices
• Block
• Cache
• Codebase
• Content
• Cron
• Database
• Extensions
• Front E...
What doesn’t

Site Audit analyze?
• Usability and site experience
• Aesthetics
• Semantic content
Usage
drush help --filter=site_audit
drush audit_cache
drush ac --detail
JSON output
drush audit_cron --json
HTML Output
drush audit_best_practices --html --detail
Audit All
drush aa --skip=insights --html --bootstrap
Extending site_audit
• Modules can implement both
checks and reports
• Feature requests in issue
queue
• GitHub and drupal...
Share your checks!
Unused Modules
• https://www.drupal.org/project/unused_modules
• Lists unused modules and projects that can be safely dele...
Security Review
• https://www.drupal.org/project/security_review
• Checks site and hosting configuration, site content for
...
Hacked!
• https://www.drupal.org/project/hacked
• Compares Drupal, contrib modules and themes with version
on drupal.org
•...
Cache Audit
• https://www.drupal.org/project/cacheaudit
• Reports caching settings of Drupal core, Block, Views,
Panels
• ...
PHP_CodeSniffer / Coder
• https://github.com/squizlabs/PHP_CodeSniffer
• https://www.drupal.org/project/coder
• Detect devi...
PHP Tools
• PHP Copy/Paste Detector - https://github.com/
sebastianbergmann/phpcpd
• PHP Mess Detector - http://phpmd.org/...
Git Tools
• GitStats - http://gitstats.sourceforge.net/
• statistics generator
• gitinspector - https://code.google.com/p/...
JavaScript Tools
• ESLint - http://eslint.org/
• Pluggable linting utility for JavaScript and JSX
• JSCS - http://jscs.inf...
WebPageTest.org
Google PageSpeed Insights
• https://developers.google.com/speed/pagespeed/insights/
TOO MUCH INFORMATION
Effectively delivering an audit
Structure of a Report
• Overview
• Actionable recommendations
• Appendix
• How to install & use tools
• Raw results
GitBook for publishing reports
• https://github.com/GitbookIO/gitbook
• Book format and toolchain using Git and Markdown
•...
Editing GitBook structure with Atom
GitBook HTML Format
Good configuration matters.
@FluxSauce - github.com/fluxsauce - drupal.org/u/fluxsauce
Applied site_audit recommendations.
Upcoming SlideShare
Loading in …5
×

How to audit Drupal Sites for performance, content and best practices

985 views

Published on

Join Jon Peck, author of Site Audit as we discuss what static analysis is and why we should analyze sites, then explore how to use dozens of industry recognized Drupal and code analysis tools on both Drupal 7 and 8 sites.

Published in: Internet
  • There are over 16,000 woodworking plans that comes with step-by-step instructions and detailed photos, Click here to take a look ➤➤ http://tinyurl.com/y3hc8gpw
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Get access to 16,000 woodworking plans, Download 50 FREE Plans... ★★★ http://tinyurl.com/y3hc8gpw
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

How to audit Drupal Sites for performance, content and best practices

  1. 1. How to Audit Drupal Sites for performance, content
 and best practices about.me/jonpeck 2015.08.29 - DrupalCamp LA
  2. 2. Jon Peck Senior Engineer at FourKitchens.com @FluxSauce - github.com/fluxsauce - drupal.org/u/fluxsauce
  3. 3. What is an audit? • official inspection of accounts • validate the good things • highlight areas of improvement
  4. 4. Why audit sites? • Learn about contents and structure • Ensure optimal configuration • Discover areas of improvement
  5. 5. Every site is unique, but… • Built with the same framework • Similar architectural requirements • One size fits most
  6. 6. Effective auditing • Consistent • Quantifiable • Contextually aware • Easy to understand • Actionable recommendations
  7. 7. Static program analysis • Performance & behavior gathering • Does not execute • Non-intrusive • Automated
  8. 8. Tools for Auditing Yup, it’s wood.
  9. 9. Site Audit • https://www.drupal.org/project/site_audit • Drupal site analyzer • Drush command on
 target platform • Reports in many formats • Powers Launch Check
 on Pantheon
  10. 10. What does Site Audit check? • Best Practices • Block • Cache • Codebase • Content • Cron • Database • Extensions • Front End • Security • System Status • Users • Views • Watchdog
  11. 11. What doesn’t
 Site Audit analyze? • Usability and site experience • Aesthetics • Semantic content
  12. 12. Usage drush help --filter=site_audit
  13. 13. drush audit_cache
  14. 14. drush ac --detail
  15. 15. JSON output drush audit_cron --json
  16. 16. HTML Output drush audit_best_practices --html --detail
  17. 17. Audit All drush aa --skip=insights --html --bootstrap
  18. 18. Extending site_audit • Modules can implement both checks and reports • Feature requests in issue queue • GitHub and drupal.org
  19. 19. Share your checks!
  20. 20. Unused Modules • https://www.drupal.org/project/unused_modules • Lists unused modules and projects that can be safely deleted • Ignores disabled child modules
  21. 21. Security Review • https://www.drupal.org/project/security_review • Checks site and hosting configuration, site content for security problems
  22. 22. Hacked! • https://www.drupal.org/project/hacked • Compares Drupal, contrib modules and themes with version on drupal.org • Does not have Git support yet
  23. 23. Cache Audit • https://www.drupal.org/project/cacheaudit • Reports caching settings of Drupal core, Block, Views, Panels • Panels is unique (not in Site Audit)
  24. 24. PHP_CodeSniffer / Coder • https://github.com/squizlabs/PHP_CodeSniffer • https://www.drupal.org/project/coder • Detect deviations from Drupal Coding Standards
  25. 25. PHP Tools • PHP Copy/Paste Detector - https://github.com/ sebastianbergmann/phpcpd • PHP Mess Detector - http://phpmd.org/ • Possible bugs, suboptimal or unused code, overcomplicated expressions • PHP LOC - https://github.com/sebastianbergmann/ phploc • Measures size and structure
  26. 26. Git Tools • GitStats - http://gitstats.sourceforge.net/ • statistics generator • gitinspector - https://code.google.com/p/gitinspector/ • statistical analysis tool
  27. 27. JavaScript Tools • ESLint - http://eslint.org/ • Pluggable linting utility for JavaScript and JSX • JSCS - http://jscs.info/ • JavaScript Code Style • JSHint - http://jshint.com/ • Community-driven tool to detect errors, potential problems
  28. 28. WebPageTest.org
  29. 29. Google PageSpeed Insights • https://developers.google.com/speed/pagespeed/insights/
  30. 30. TOO MUCH INFORMATION Effectively delivering an audit
  31. 31. Structure of a Report • Overview • Actionable recommendations • Appendix • How to install & use tools • Raw results
  32. 32. GitBook for publishing reports • https://github.com/GitbookIO/gitbook • Book format and toolchain using Git and Markdown • Command-line, uses Node.JS • Outputs HTML, PDF, ebooks, and more • Incredibly useful for large structured reports
  33. 33. Editing GitBook structure with Atom
  34. 34. GitBook HTML Format
  35. 35. Good configuration matters. @FluxSauce - github.com/fluxsauce - drupal.org/u/fluxsauce Applied site_audit recommendations.

×