Opinion
PERREN, J.Francisco Placencia appeals the denial of his motion to vacate the judgment following a plea of nolo contendere to possession or control of child pornography. (Pen. Code, § 311.11, subd. (a).)1 He contends the trial court erred by not adequately advising him of the immigration consequences of his plea as required by section 1016.5.2 We conclude that the motion *492constitutes an attack on the validity of a plea, and an appeal from the denial of the motion requires the defendant to obtain a certificate of probable cause from the trial court in compliance with section 1237.5. Because Placencia did not obtain a certificate of probable cause, we dismiss the appeal.
FACTS AND PROCEDURAL HISTORY3
Police discovered Placencia had transmitted through his e-mail a photograph showing a four-year-old female child with her mouth over an adult male’s erect penis. Placencia admitted he had received and transmitted many DVD’s showing children in the nude and in sexual poses. One of his DVD’s contained approximately 50 photographs of female children in provocative poses and various levels of undress.
In September 2008, Placencia was charged with exhibiting a minor in pornography (§ 311.2, subd. (b)), and possession or control of child pornography (§ 311.11, subd. (a)). He pleaded no contest to the possession or control offense and the exhibiting a minor in pornography offense was dismissed. Before pleading no contest, Placencia signed and initialed a preprinted plea form. The form stated: “If I am not a citizen of the United States, I understand that the law concerning the effect of my conviction of a criminal offense of any kind on my legal status as a non-citizen will change from time to time. I hereby expressly assume that my plea of NO CONTEST in this case will, now or later, result in my deportation, exclusion from admission or readmission to the United States, and denial of naturalization and citizenship.” In the form Placencia also acknowledged: “I have read and understand this form. I understand the pleas and admissions I am entering, the consequences thereof and the constitutional rights I am waiving.” Placencia’s attorney declared in the plea form that he had fully explained its terms to Placencia.
On January 29, 2009, the trial court suspended imposition of sentence and placed Placencia on five years’ formal probation with the condition that he serve a term of 150 days in county jail.
In March 2010, Placencia filed a motion to vacate the judgment, claiming the trial court failed to adequately advise him of the immigration consequences of his plea. (§ 1016.5.) At the plea hearing, the trial court asked Placencia whether he had adequate time to review the plea agreement with his counsel, and Placencia answered, “yes.” The prosecutor also asked whether he and his attorney had specifically discussed immigration consequences and Placencia answered, “yes.” The trial court denied the motion.
*493After the motion was denied, Placencia filed a notice of appeal challenging the validity of his plea, and requested a certificate of probable cause. The trial court denied the request for a certificate of probable cause and, in June 2010, this court dismissed the appeal. (Cal. Rules of Court, rule 8.304(b)(3).)
Placencia filed a motion in this court to vacate the June 2010 order, claiming that his notice of appeal erroneously stated the basis for the appeal. We granted the motion, and Placencia filed an amended notice of appeal stating that the appeal was from denial of his section 1016.5 motion to vacate the judgment.
DISCUSSION
Placencia contends that, because he was inadequately advised of the immigration consequences of his plea, the trial court erred in denying his motion to vacate the judgment. He argues that an appeal is proper without a certificate of probable cause because his motion was made after the judgment and pursuant to statutory authorization. We disagree.
Section 1237.5 provides that a defendant may not appeal a judgment of conviction entered on a plea of guilty or nolo contendere without obtaining a certificate of probable cause from the trial court, unless the appeal is based solely upon grounds occurring after entry of the plea and which do not challenge its validity. (Cal. Rules of Court, rule 8.304(b); People v. Johnson (2009) 47 Cal.4th 668, 678 [101 Cal.Rptr.3d 332, 218 P.3d 972]; People v. Mendez (1999) 19 Cal.4th 1084, 1096 [81 Cal.Rptr.2d 301, 969 P.2d 146].) The purpose for requiring a certificate of probable cause is to prevent frivolous appeals challenging convictions following guilty and nolo contendere pleas. (Johnson, at p. 676; People v. Panizzon (1996) 13 Cal.4th 68, 75-76 [51 Cal.Rptr.2d 851, 913 P.2d 1061].)
Section 1016.5 requires the court to advise a defendant of the immigration consequences of a plea of not guilty or nolo contendere prior to entry of the plea. (§ 1016.5, subd. (a).) If the court fails to give the advisement and the conviction has immigration consequences adverse to the defendant, “the court, on defendant’s motion, shall vacate the judgment and permit the defendant to withdraw the plea of guilty or nolo contendere, and enter a plea of not guilty.” (§ 1016.5, subd. (b).)
In People v. Totari (2002) 28 Cal.4th 876, 881-882 [123 Cal.Rptr.2d 76, 50 P.3d 781], our Supreme Court held that an order denying a motion brought under section 1016.5, subdivision (b) is appealable as an “ ‘. . . order made after judgment, affecting the substantial rights of the party’ (§ 1237, subd. (b)).” Totari, however, did not consider whether a certificate of *494probable cause was required for the appeal. The defendant in Totari obtained a certificate of probable cause, and the issue was not raised. (Totari, at p. 880.) We conclude that a certificate of probable cause is required.
An appeal from a denial of a section 1016.5 motion is technically from an “order made after judgment” (§ 1237, subd. (b)) and not “from a judgment of conviction upon a plea” of guilty or nolo contendere (§ 1237.5). But a section 1016.5 motion follows a claimed failure by the trial court to advise the defendant of the immigration consequences of a plea of guilty or nolo contendere which necessarily precedes the entry of the plea and affects the validity of the plea. (See People v. Kaanehe (1977) 19 Cal.3d 1, 8 [136 Cal.Rptr. 409, 559 P.2d 1028]; see People v. Johnson, supra, 47 Cal.4th at pp. 678-679.) Placencia himself acknowledges that his appeal is a direct challenge to the validity of his plea in both his appellate briefs and in his request for a certificate of probable cause.
The Supreme Court has recently reiterated the long-established rule that “[a] defendant must obtain a certificate of probable cause in order to appeal from the denial of a motion to withdraw a guilty plea, even though such a motion involves a proceeding that occurs after the guilty plea. [Citation.]” (People v. Johnson, supra, 47 Cal.4th at p. 679.) Courts must consider the substance of the claim and not the timing of the events. (People v. Buttram (2003) 30 Cal.4th 773, 781-782 [134 Cal.Rptr.2d 571, 69 P.3d 420].) “ ‘[T]he crucial issue is what the defendant is challenging, not the time or manner in which the challenge is made.’ [Citation.] . . . [T]he critical inquiry is whether a challenge to the sentence is in substance a challenge to the validity of the plea, thus rendering the appeal subject to the requirements of section 1237.5.” (People v. Panizzon, supra, 13 Cal.4th at p. 76; see Johnson, at p. 679.)
Section 1237.5 should be “applied in a strict manner.” (People v. Mendez, supra, 19 Cal.4th at p. 1098.) If a defendant could circumvent its requirements by placing a different label on his or her motion, the purpose of section 1237.5 would be undermined. (People v. Johnson, supra, 47 Cal.4th at p. 679.) Similarly, the existence of an express statutory basis for a motion to challenge a trial court’s failure to give an immigration advisement does not warrant creation of a new exception to the certificate of probable cause requirement. Moreover, section 1237.5 does not impede a defendant’s right to appeal any nonfrivolous issue if he or she seeks and obtains a certificate of probable cause. Section 1237.5 concerns the procedure for perfecting an appeal from a judgment based on a plea of guilty or nolo contendere; it does not limit the grounds upon which an appeal may be taken. (People v. Ribero (1971) 4 Cal.3d 55, 63 [92 Cal.Rptr. 692, 480 P.2d 308].) The trial court must issue the certificate if the defendant presents any nonfrivolous cognizable *495issue for appeal, and if the trial court wrongfully refuses to issue a certificate, the defendant may obtain relief from the error through a writ of mandate. (Johnson, at p. 676.)4
Placencia’s appeal is dismissed.
Yegan, Acting P. J., and Coffee, J., concurred.
All statutory references are to the Penal Code.
Section 1016.5 provides in relevant part: “(a) Prior to acceptance of a plea of guilty or nolo contendere to any offense punishable as a crime under state law ... the court shall administer the following advisement on the record to the defendant: [ft] If you are not a citizen, you are hereby advised that conviction of the offense for which you have been charged may have the consequences of deportation, exclusion from admission to the United States, or denial of naturalization pursuant to the laws of the United States, [ft] (b) ... If ... the court fails to advise the defendant as required by this section and the defendant shows that conviction of the offense to which defendant pleaded guilty or nolo contendere may have the consequences for the defendant of deportation, exclusion from admission to the United States, or denial of naturalization pursuant to the laws of the United States, the court, on defendant’s motion, shall vacate the judgment and permit the defendant to withdraw the plea of guilty or nolo contendere, and enter a plea of not guilty.”
Because of the no contest plea, the facts are derived from the probation report.
As a result of this dismissal, we deny Placencia’s January 3, 2011, motion for speedy ruling as moot.