In a city or town having a planning commission established under this chapter, but which has not adopted an official map, no public way shall be laid out, altered, relocated or discontinued unless the proposed laying out, alteration, relocation or discontinuance has been referred to the planning commission of such city or town and such commission has reported thereon or has allowed 45 days to elapse after such reference without submitting its report. Any city or town having a planning commission established under this chapter may, by ordinance, bylaw or vote, provide for the reference of any other matter or class of matters to the planning commission before final action thereon with or without provision that final action shall not be taken until the planning commission has submitted its report or has had a reasonable fixed time to submit such report. Such planning commission shall have full power to make such investigations, maps and reports and recommendations in connection therewith, relating to any of the subjects referred to under this section, as it deems desirable.