Due to its significance in the operation of power systems, the optimal power flow (OPF) problem has attracted increasing interest with the introduction of smart grids. Optimal power flow developed as a crucial instrument for resource planning effectiveness as well as for enhancing the performance of electrical power networks. Transmission line losses, total generation costs, FACTS (flexible alternating current transmission system) costs, voltage deviations, total power transfer capability, voltage stability, emission of generation units, system security, etc., are just a few examples of objective functions related to the electric power system that can be optimized. Due to the nonlinear nature of optimal power flow problems, the classical approaches may become locked in local optimums, hence, metaheuristic optimization techniques are frequently used to solve these issues. The most recent optimization strategies used to solve optimal power flow problems are discussed in this paper as the state of the art (according to the authors, the most pertinent studies). The presented optimization techniques are grouped according to their sources of inspiration, including human-inspired algorithms (harmony search, teaching learning-based optimization, tabu search, etc.), evolutionary-inspired algorithms (differential evolution, genetic algorithms, etc.), and physics-inspired methods (particle swarm optimization, cuckoo search algorithm, firefly algorithm, ant colony optimization algorithm, etc.).