• No results found

Bubble Code Review for Magento

N/A
N/A
Protected

Academic year: 2021

Share "Bubble Code Review for Magento"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

Bubble  Code  Review  for  Magento  

–  

User  Guide  

Author:     Johann  Reinke   Version:   1.1  

Website:   https://www.bubbleshop.net  

Support:   [email protected]  

(2)

Table  of  Contents  

1

 

Introducing  Bubble  Code  Review  ...  3

 

1.1  

Features  ...  3  

1.2  

Compatibility  ...  3  

2

 

Installation  ...  3

 

3

 

How  to  use  ...  3

 

3.1  

Launch  review  from  browser  ...  3  

3.2  

Launch  review  from  the  command  line  ...  3  

4

 

Analyze  results  ...  4

 

4.1  

Server  and  Magento  configuration  ...  4  

4.2  

Pages  load  time  and  cache  strategy  ...  4  

4.3  

SQL  debugging  ...  5  

4.4  

Class  rewrites  ...  5  

4.5  

Bad  practices  (specific  modules  and  templates)  ...  6  

5

 

Customize  code  review  ...  7

 

5.1  

Specific  store  ...  7  

5.2  

Specific  URL  ...  7  

5.3  

Script  parameters  ...  7  

5.3.1

 

SQL  queries  count  ...  7

 

5.3.2

 

Disable  reports  ...  8

 

5.3.3

 

Help  ...  8

 

6

 

Reports  ...  8

 

 

 

 

(3)

1 Introducing  Bubble  Code  Review  

1.1 Features  

Here  are  the  main  features  of  Bubble  Code  Review  extension  for  Magento:   • Calculate  pages  load  time  

• Count  and  show  SQL  queries  

• List  all  classes  rewrites  (models,  blocks,  helpers)  and  prevent  potential  conflicts   • Show  cache  strategy  of  rendered  blocks  

• Check  server  configuration  (PHP,  APC,  MySQL,  ...)   • Check  Magento  configuration  

• Inspect  local  modules  and  theme  templates  to  find  potential  bad  practices   • Automatic  debugging  of  homepage,  category  view  and  product  view   • Count  active  and  disabled  modules  

• Count  entities  (products,  categories,  customers,  URL  rewrites,  ...)   • Check  forbidden  URLs  

• Run  code  review  from  browser  or  from  command  line   • Custom  stores  and  URLs  debugging  

• Automatic  report  generation  

1.2  Compatibility  

Bubble  CMS  Tree  has  been  tested  successfully  on  the  following  Magento  versions:   • Magento  Community  Edition  1.6.x,  1.7.x,  1.8.x,  1.9.x.  

• Magento  Enterprise  Edition  1.11.x,  1.12.x,  1.13.x,  1.14.x.  

2 Installation  

• Backup  your  existing  database  

• Download  and  unzip  extension  in  your  Magento  root  folder  

• Clear  cache  via  “System  >  Cache  Management  >  Flush  Magento  Cache”  

Important!  The  module  is  not  supposed  to  stay  in  a  production  environment  indefinitely  since  there  is  a  debug  mode  

available  showing  information  that  should  not  be  retrieved  by  public  users.  

3 How  to  use  

3.1 Launch  review  from  browser  

Once  extension  is  installed,  you  just  have  to  launch  your  favorite  browser  and  to  call  your  Magento  store  with  the   following  URL:  

http://mystore.com/shell/review.php

3.2 Launch  review  from  the  command  line  

You  can  also  run  the  script  from  the  command  line  by  running  the  following  command:  

(4)

4 Analyze  results  

4.1 Server  and  Magento  configuration  

The  first  thing  the  script  does  is  showing  information  about  the  server  and  Magento  configuration.    

 

   

It  is  important  to  try  following  the  recommendations  about  the  configuration  for  better  performances  of  your  Magento   store.  

4.2 Pages  load  time  and  cache  strategy  

One  important  section  is  load  times  of  each  rendered  blocks  of  a  page.  The  script  also  retrieves  the  cache  strategy  for   each  block.  

(5)

   

The  list  is  displayed  as  a  tree  structure  in  order  to  see  blocks  children  easily.  

4.3 SQL  debugging  

Another  important  section  is  the  SQL  queries  debugging  that  allows  you  to  see  SQL  queries  that  are  run  on  each  page.   You  can  also  see  the  queries  per  template  or  how  often  a  same  query  is  run.  

 

   

Note:  you  can  customize  from  how  many  queries  count  you  want  to  display  queries.  Default  is  2,  more  information  on   how  to  define  queries  count  parameter  below.  

4.4 Class  rewrites  

The  list  of  class  rewrites  is  particularly  useful  to  see  in  a  second  how  many  and  which  core  classes  are  rewritten  by  the   custom  modules.  It’s  also  possible  to  see  the  core  classes  that  are  rewritten  twice  or  more  and  thus  prevent  potential   conflicts.  

(6)

 

4.5 Bad  practices  (specific  modules  and  templates)  

Best  practices  that  Magento  development  implies  must  be  respected  in  order  to  upgrade  easily  to  a  new  version  and  to   facilitate  the  source  code  understanding.  The  script  checks  automatically  the  custom  modules  (community  and  local)   and  the  templates  of  the  specified  store  view.  

(7)

5 Customize  code  review  

5.1 Specific  store  

The  default  behaviour  is  to  run  the  code  review  on  the  default  store  view.  In  order  to  run  the  script  on  a  specific  store,   you  just  have  to  add  the  store  code  as  a  parameter  like  this:  

• Running  from  browser:  /shell/review?store=french  

• Running  from  CLI:  php shell/review.php -- --store french  

 

5.2 Specific  URL  

3  URLs  are  checked  by  default:     • The  homepage  

• A  random  category  page   • A  random  product  page  

You  can  specify  which  page  you  want  to  debug  by  adding  the  URL  as  a  parameter:  

• Running  from  browser:  /shell/review?url=http://mystore.com/my-custom-page.html  

• Running  from  CLI:  php shell/review.php -- --url http://mystore.com/my-custom-page.html   If  you  specify  a  custom  URL,  the  default  pages  will  not  be  added  to  the  code  review.  

5.3 Script  parameters  

5.3.1 SQL  queries  count  

By  default,  only  SQL  queries  that  are  run  more  than  twice  are  displayed.  If  you  want  to  modify  this  behavior,  just  add  a   count  parameter  to  the  script  command:    

• Running  from  browser:  /shell/review?count=1  

(8)

 

5.3.2 Disable  reports  

A  report  is  automatically  generated  and  saved  after  each  review.  You  can  disable  this  by  adding  a  parameter  like  this:   • Running  from  browser:  /shell/review?no-report=1  

• Running  from  CLI:  php shell/review.php -- --no-report  

5.3.3 Help  

To  show  script  help,  just  do:  

• Running  from  browser:  /shell/review?help   • Running  from  CLI:  php shell/review.php -- -h  

6 Reports  

Reports  are  generated  each  time  a  review  is  run  (unless  you  disable  it).  They  are  simple  text  files  located  in  

References

Related documents

The etracker Magento plugin is used to set up the etracker tracking code in your Magento online shop software.. The plugin offers many etracker

Then apply downward pressure to the lever body and use the pliers to remove the snap ring in the lever body along with the piston/bladder assembly.. Remove the lever body from

Magento Extension REVIEW BOOSTER User Guide Copyright © 2014 www.magebuzz.com 1 Magento Extension REVIEW BOOSTER User Guide Version 0.1.0 Release Date 2 April, 2014

Do Seacare scheme benefits need to be refreshed to align with benefits available to workers under the Safety Rehabilitation Compensation

Magento Associates are companies that have experience working with Magento Community Edition, or companies that are in the process of developing their Magento Enterprise

It is very important that uniCenta oPOS is installed on Mysql database or the Magento extension will not work.. Magento 1.7, Magento 1.8,

Magento to GP - Customer Group Creation Sync [Real Time] Magento to GP - Credit Limit Update [Real Time]. Magento to GP - View & Pay Credit Limit EMIs GP to Magento - Customer

In order to identify the signals that may have the greatest value in interpreting a seller’s reputation, this study uses a sample of Russian and English-language forums to examine