Performance tuning of scientific codes often requires tuning many different aspects like vectorization, OpenMP synchronization, MPI communication, and load balancing. The Periscope Tuning Framework (PTF), an online automatic tuning framework, relies on a flexible plugin mechanism providing tuning plugins for different tuning aspects. Individual plugins can be combined for convenience into meta-plugins. Since each plugin can take considerable execution time for testing various combinations of the tuning parameters, it is desirable to automatically predict the tuning potential of plugins for programs before their application. We developed a generic automatic prediction mechanism based on machine learning techniques for this purpose. This paper demonstrates this technique in the context of MPI Parameters and Compiler Flags Selection plugins. The MPI Parameters plugin tunes the parameters of a user-specified MPI implementation for a given application while the CFS plugin tunes the parameters of a user-specified compiler for a given application.