XRD by itself can not used to measure sample porosity (it only identifies crystalline phases/structures in the sample)... It can be used to determine the theoretical density of the phases present in the sample as given above or from the XRD file for the identified phase. The sample density has to be measured independently to estimate porosity.
XRD can be used to estimate particle size of powders by line broadening.
On the basis of XRD data, it is very difficult to comment on porosity. From XRD, we can calculate the crystal size rather than particle size (in particular). BET characterization plays vital role in finding the porosity. Depending on the pore size or volume, we may jump to decision. Microporous = 1 - 2 nm