Check CA laws.....
In NE it must have operational pedals to be classified as a moped. The law clearly states if the pedals are removed or not operable, it is considered an off road bike (AKA pocket bike or minibike),, and is illegal to operate on the streets.
So the cop very likely righteously ticketed you for illegally operating a non-moped on the street.
Look at your laws . You may want to make it street legal according to your state definitions of a moped.
A "motorized bicycle" or "moped" is:
•A two or three-wheeled device, capable of no more than 30 mph on level ground, and equipped with:
– Fully operative pedals for human propulsion.
– A motor producing less than two gross brake horsepower and an automatic transmission.
– An electric motor, with or without pedals for human propulsion. (CVC §406(a))
Driver must have a motorcycle license (M1 or M2).
•A “motorized bicycle” is also defined as a vehicle with pedals and an electric motor (not more than 1,000 watts) which cannot be driven at speeds of more than 20 mph on level ground even if assisted by human power. (CVC §406(b)).
If you operate a motorized bicycle which meets the definition of CVC §406(b), you:
– Must be 16 years of age or older.
– Must wear a properly fitted and fastened bicycle helmet.
– Are exempt from the motor vehicle financial responsibility, driver license, and moped plate requirements (CVC §12804.9). •A motorized bicycle is issued special license plates and identification cards, which requires a one-time $18 fee. No renewal is required. (edited)