What Factors Make Performance Appraisals Legally Defensible?

One reason companies use performance appraisals is to have some legally defensible means of making employment and job decisions that will a) discourage frivolous law suits in the first place, OR b) ensure the company is likely to win a court decision if the law suit goes to court. Performance appraisals can provide some protection provided they are done properly. If they are not done properly, then they become weapons for the other side in court cases, particularly in the areas of discrimination accusations and EEOC complaints.

Keeping in mind that it is always the courts that decide, and they decide on the merits of a particular case, and that this should not be construed as legal advice, what are the characteristics of performance appraisal systems that are legally defensible?