Scale-dependent permeability and formation factor in porous media: Applications of percolation theory