This dropdown menu shows two useful operators to optimize your .Blend file
Remove unused slots deletes all empty material slots from all selected objects.
Purge Data removes from the .blend file all datablocks (Materials, Textures, Node groups) that aren’t used by any object of the scenes.