The metal structures are widely used in aerospace engineering, especially in joints and spars. The safety of these parts is important to ensure the safe service of the whole structures. The ultrasonic wave is a traditional technique to detect cracks in metals. However, it is usually difficult to find all the cracks because of its difficulty in variable directions of the crack and the irregular shapes of the metals. This paper aims to address the challenge of detecting cracks in metallic structures with varying cross-sectional thicknesses using ultrasonic methods. The research investigates the behavior of ultrasonic longitudinal and transverse waves as they propagate through aluminum plates with variable cross sections. Additionally, it examines how cracks in different orientations influence these wave types. The theoretical analyses are performed which explore the reflection of oblique incidence waves and the diffraction of ultrasonic waves when they encounter semi-infinite cracks. Subsequently, numerical simulations are performed to validate the theoretical findings and to detect both horizontal and vertical cracks within metal plates of varying cross-sectional thicknesses. The findings indicate that both longitudinal and transverse waves are effective in identifying the location of damage caused by horizontal cracks. However, when it comes to vertical cracks, only transverse waves are successful in detecting their precise location. From the research of this paper, transverse ultrasonic wave is suggested to detect cracks in metal structures with irregular cross sections.