In many secondary schools, classroom assessments still use tests that are written by hand, which makes it hard for teachers to ensure each question matches the right level of thinking from Bloom's taxonomy or to check if the questions are statistically reliable. This study tackles that issue by creating a web-based testing system for a madrasah tsanawiyah, which automatically sorts multiple-choice questions, checks their quality using psychometric methods, and offers custom learning suggestions to help students improve. Cognitive-level tags (C1 to C6) are assigned by matching keywords that describe actions, and a kNearest Neighbor classifier uses TF-IDF features to sort items into groups that show more or less complex thinking. Item quality is checked using Classical Test Theory module automatically computes the difficulty index and discrimination index of each item from students answer patterns, and materials that help improve learning are chosen based on each student's weak areas through content-based filtering. The system was developed using the Waterfall model and was tested on 600 items taken from three different subjects. The classifier achieved 86.67% accuracy when using k=11, which was verified through 10- fold cross-validation showing 81.83% ± 5.19%, and all 23 black-box test cases were successfully passed. The results show that using automatic item analysis along with adaptive remediation is possible to implement in assessment practices at the madrasah level. The main contribution of this study is the integration of automatic cognitive classification, CTT-based psychometric analysis, and content-based filtering remedial recommendation into a single real-time examination platform, a combination that has not been found in previous similar studies, which generally address only one of these three aspects separately.