Sentiment analysis (SA) plays a critical role in various domains, providing valuable insights into public opinion regarding brands, products, and events. By leveraging this method, companies can enhance customer satisfaction through informed adjustments to their products. This study aims to implement sentiment analysis on user comments from online sales platforms. We propose and evaluate four machine learning (ML) algorithms alongside a deep learning (DL) model. Moreover, our dataset contains noise data that is unsuitable for classification, which negatively impacts performance. To address this issue, feature selection methods are employed to facilitate the algorithms in identifying meaningful patterns more effectively, thereby reducing computational time by focusing on the most contributive features within the dataset. In this context, we apply the binary variant of the Sailfish Optimization Algorithm (SOA), referred to as the Binary Sailfish Optimizer (BSO), as a feature selection technique tailored for our textual dataset, marking its inaugural application in sentiment analysis. To assess the effectiveness of the BSO, we conduct comparative analyses against four other optimization algorithms: Harmony Search (HS), Bat Algorithm (BA), Atom Search Optimization (ASO), and Whale Optimization algorithm (WOA). Our findings indicate that the BSO outperforms the existing algorithms, achieving an F-score of 0.91 while utilizing nearly half of the available features.