If you turned on the radio even once in the last year, chances are Bonnie McKee's lyrics got lodged in your head. For days. With collaborators Lukasz “Dr. Luke” Gottwald and Max Martin, she wrote most of the pop anthems that have been dominating the charts, from Taio Cruz's “Dynamite” to Britney's “Hold It Against Me.” She contributed four songs to Katy Perry's Teenage Dream, two of which, “California Gurls” and the title track, have already taken the top spot on the Billboard Hot 100. Her latest, “Last Friday Night (T.G.I.F.),” is poised to do the same, and if that happens, Teenage Dream will surpass Michael Jackson's record for most No. 1 singles from a single album. McKee isn't a household name, but as far as sounds go, she's already got you humming along, whether you like it or not.

Though McKee only recently has emerged on the songwriting scene, she's been around long enough to live both the California dream and nightmare. Born and raised in Seattle, she moved to Hollywood at the age of 16, armed with a few tracks she'd managed to record before getting kicked out of the ninth grade. Her demo made it onto KCRW's Morning Becomes Eclectic, and suddenly she found herself in the middle of a bidding war. “It's really like I had won the lottery,” she says. “I was discovered out of nowhere. I didn't have family that was in the industry, I didn't know anyone in L.A., I didn't have any reason to have been discovered. Nowadays you have YouTube and people are scouting more, but I really was plucked out of obscurity.”

Her first album, Trouble, was released by Reprise Records in 2004. (She's working on her second, which she aims to have out early next year.) Composed entirely by McKee, it's a bluesy, introspective look into a young woman's coming of age. Its earnestness, however, is laced with a disarmingly wicked wit, not unlike the shock of bright red hair that frames her girl-next-door smile. And despite the fact the earliest songs were written when she was just 14, each conveys the sense that she's fully in charge, even if she doesn't quite know where she's going. “Somebody,” the album's most solidly realized ballad, strikes an anguished balance between wanting and waiting, and on the kittenish “Confessions of a Teenage Girl,” McKee tosses off lines like “I use my gender to my advantage” with more than a hint of a growl.

“Confessions” caught the attention of a then-struggling Katy Perry, and the two quickly became friends and co-conspirators, “digging through the couch for change for food, and sneaking our way into parties we didn't belong in.”

The album flopped, however, and McKee was unceremoniously dumped from her label. “When I first moved down here it was, like, dream come true! Got this huge record deal and everyone's fawning over you and kissing your ass. And then all of a sudden one day, nobody picks up a phone for you, and nobody cares.”

At a low point, living in a “rat-infested coke-den studio,” and barely scraping by, she sought the advice of an old Indian astrologer. “Should I get a day job?” she wondered. He shook his head. “Keep writing,” he said. “Pen to paper, pen to paper.”

She did, though that meant composing jingles for The Biggest Loser and KFC. She eventually landed a production deal with Dr. Luke in 2010, and as one of her first assignments, he suggested she help out with a new track he was cutting for Katy Perry.

“It was a little … weird at first,” McKee admits. The friends had drifted apart while Perry's career took off. “We had never written together. We had played shows together, and we had partied together, but we'd never written together, and it was really just like magic.”

She isn't kidding — their songs suddenly were everywhere, not just on the radio but lip-synched or covered on YouTube, reworked on Glee and, of course, subjected to hipster diatribes in Williamsburg.

“It's funny — I get more playful and almost younger as I go,” McKee says. Her recent songs with Perry, for example, condense the fantasies of a '90s girlhood, one “raised on television.” She cites Beverly Hills, 90210, MTV Beach House and Pauly Shore as major influences: “I always had the fantasy of Hollywood and Los Angeles and the beach, not realizing that Hollywood was so very far from the beach. When I was a little kid I was always drawing pictures of skyscrapers and girls in bikinis. 90210 was my idea of what teenagers do, and what cool kids do.” On “Teenage Dream,” meanwhile, “I thought back to my middle-school experience of having slumber parties and watching Romeo + Juliet and staring at Leo and thinking about my first kiss and what I wanted it to be like. And when you have your first real love it's an epiphany, you know? It's like a whole new world.”

Effervescent and irreverent as her lyrics may be, there's also the speed with which they flash by, each line a new image (or “photograph,” as she says), something akin to channel surfing. McKee's brand of pop is flighty. Her songs are about a kind of movement; as she clicks rapidly through her references, she's crashing and burning through a kind of cultural sugar rush, appropriating bits of movies and TV into her own life story. Even if they're false, flimsy or ill-fitting, she tries them on and wears them out.

And for every sunny vista of “California Gurls,” there's the inevitable shadow, too, a darkness suggested in the post-party blackout of “Last Friday Night” — “Is this a hickey or a bruise?” — or the nostalgic trace of adolescent romance in “Teenage Dream,” unrecoverable except in make-believe.

While a number of feminist critics are uncomfortable (for good reason) with pop's overt girliness and the genre's unevolved sexual politics, McKee's greatest contribution might be the space she holds for her audience — which, as with all of pop, is composed mostly of teenage girls — to embrace these clichés but also to move past them.

There's pleasure, and power, too, just having a broader range of expression, an expanded sense of what women can do, even if that means falling down drunk. In the world she writes, trying often is met with “epic fails” of the sort described in “Last Friday Night,” but that's no reason to feel ashamed. Pick yourself up and “do it all again,” as the chorus affirms.

McKee is probably pop's most ardent defender of fucking up.

Speaking of … when she describes how Britney Spears' “Hold It Against Me” came about, she laughs. “That song was inspired by Katy Perry. I was in the studio with her writing Teenage Dream stuff and she came in some slutty little dress and I was like, 'Damn, Katy, if I told you you had a nice body, would you hold it against me?' You know, classic pickup line.” Again, the goofiness of the lyric distracts from its boldness — how often do you hear a woman come on to anyone like that? A woman who knows what she wants, and can say it directly?

McKee pauses for a moment. “It's funny, the way the melody works, it makes it emotional. Like when you hear it, it's a stupid cheesy pickup being sung, but the way that [Britney] sings it and this melody that it's on top of, it gives it a whole, really honest feel about it. You could say anything and if the melody feels right, and sings right, then it can turn into something real.”

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.