Smaller PSD offers a variety of helpful scripts and functions to reduce your PSDs file size. It processes all layers, so you don't have to select anything by hand. The panel can reduce/delete invisible layers and pixels, flatten or rasterize layers, apply masks, replace placeholder images with frames and more.
Works with Photoshop CC 2015+.
images which are only placeholders (- can be replaced by color or frame),
images which can be reduces in sharpness / detail,
layers which are obscured by other layers (hidden pixels),
layers with (pixel) masks,
layers with clipping masks (clipping layer must be larger than its base),
layers which stand out of the document bounds,
hidden or invisible layers (visibility, opacity, fillOpacity),
layer styles / effects which are hidden,
groups which can be merged,
or your PSD doesnt need maximal compatibility (no thumbnail / preview in other software)