
808 So.2d 1226 (2000)
Tyree Vashone COCHRAN
v.
STATE of Alabama.
CR-99-1664.
Court of Criminal Appeals of Alabama.
December 1, 2000.
Tyree Vashone Cochran, pro se.
Bill Pryor, atty. gen., and Hense R. Ellis II, asst. atty. gen., for appellee.
*1227 COBB, Judge.
Tyree Vashone Cochran pleaded guilty to attempted theft of property, first degree, a violation of §§ 13A-8-3 and 13A-4-2, Ala.Code 1975. Cochran was sentenced to 15 years in prison upon application of the Habitual Felony Offender Act. Cochran's counsel filed a brief with this Court, stating that he could find no arguable error in the record, and citing Anders v. California, 386 U.S. 738, 87 S.Ct. 1396, 18 L.Ed.2d 493 (1967).
Upon further review of the record, Cochran's counsel filed a supplemental brief with this Court. In order to comply with the due process requirements of the United States Constitution and the Alabama Constitution, as well as with other applicable law, and to ensure that Cochran has, "an active advocate, rather than a mere friend of the court assisting in a detached evaluation of the appellant's claim," Evitts v. Lucey, 469 U.S. 387, 394, 105 S.Ct. 830, 83 L.Ed.2d 821 (1985), Cochran, through counsel, raises five issues on appeal. We affirm as to the conviction and remand with directions as to sentencing.
On December 23, 1998, Cochran took his mother's 1989 Chevrolet automobile without her permission. She reported to the police that her car had been stolen. Cochran was apprehended with the vehicle and arrested. Cochran raises the following issues regarding his guilty plea:
1. His guilty plea was not knowingly, voluntarily, and intelligently entered into.
2. The prosecutor abandoned his role by allowing Cochran to plead guilty without providing a sufficient factual basis for the plea.
3. The trial judge was not presented with sufficient facts to establish a factual basis for the plea.
An issue raised on an appeal from a guilty plea must be preserved by an objection, a motion to withdraw the plea, or a motion for a new trial. Willis v. State, 500 So.2d 1324, 1324 (Ala.Crim.App. 1986). As was the case in Williams v. State, 727 So.2d 879 (Ala.Crim.App.1998), Cochran did not object at the plea hearing, and he failed to present his claims in a motion to withdraw the guilty plea or in a motion for a new trial. "Claims relating to the voluntariness of a guilty plea must be presented to the trial court or they are waived." Anderson v. State, 668 So.2d 159, 162 (Ala.Crim.App.1995). Therefore, the claim related to the voluntariness of the plea cannot be considered on appeal. Moreover, Cochran did not preserve his claims relating to the alleged insufficient factual basis for his plea. "The failure to establish a factual basis for a guilty plea is not jurisdictional; therefore, such a failure must be raised in the trial court ... or it is not preserved." Waddle v. State, 784 So.2d 367 (Ala.Crim.App.2000) (internal citations omitted).
Cochran also claims that his trial counsel was ineffective. He argues that trial counsel's performance fell below the standard of reasonable representation. However, Cochran did not bring the ineffective-assistance-of-counsel claim to the attention of the trial court and thus failed to preserve it for review on direct appeal. Dubose v. State, 652 So.2d 340, 342 (Ala. Crim.App.1994).
Last, Cochran argues that there were certain deficiencies in the sentencing hearing. Specifically, he argues that the judge did not inform him that he had a right to appeal, a right to counsel, and a right to a free copy of the reporter's transcript. Cochran timely filed a notice of appeal, received a free transcript, and was obviously appointed counsel due to his indigent status. It is clear that Cochran was *1228 informed of his rights regarding the appeal.
Cochran also contends that the sentencing procedure used by the trial court violated § 15-18-5, Ala.Code 1975, because the record does not indicate whether he was given credit for time served before his sentence was imposed. Therefore, this case is remanded to the trial court for a determination on the record of whether Cochran was given credit for time served in jail before trial.
Because Cochran's claims concerning his guilty plea and the effectiveness of his trial counsel were not preserved for review on appeal, his conviction for attempted theft of property in the first degree is due to be affirmed. With regard to his sentence, this cause is due to be, and it is hereby, remanded to the trial court. Pursuant to § 15-18-5, Ala.Code 1975, the appellant should receive credit for time spent incarcerated. On remand, the trial court should include in the record a statement that Cochran's time served was credited against his sentence. The actual time spent incarcerated pending trial shall be certified by the clerk on forms to be prescribed by the Board of Corrections.
AFFIRMED AS TO CONVICTION; REMANDED WITH DIRECTIONS AS TO SENTENCING.[*]
LONG, P.J., and McMILLAN, BASCHAB, and FRY, JJ., concur.
NOTES
[*]  Note from the reporter of decisions: On February 23, 2001, on return to remand, the Court of Criminal Appeals affirmed, without opinion. On March 23, 2001, that court denied rehearing, without opinion. On June 29, 2001, the Supreme Court denied certiorari review, without opinion (1001217).
