Influence of defects and porosity on material strength