The development of compact accelerator machines is leading towards plasma-based devices able to produce high accelerating gradients in the GV/m scale but, at the same time, with the aim of preserving the electron beam quality. The latter topic, for plasma-based accelerators, is strictly related to the plasma properties as stability, uniformity and reproducibility, which in turn depend on the geometric characteristics of the plasma device. In this context, the activity of the SPARC_LAB test-facility, where a gas-filled capillary plasma source is used to confine and characterize plasmas, is currently focused on the development of new plasma sources to minimize the beam quality degradation. The plasma ramps produced at the ends of the capillary during the gas ionization represent a critical point for the beam quality preservation, because of the plasma parameters in these areas strongly change as a function of the capillary shape and, consequently, the beam emittance could undergo a drastic degradation. In this work, we present a study on the plasma plumes formation and their effects on the beam, then we propose a possible solution based on the capillary shape modifications that are able to optimize the density profile at its extremities.