Every foreign car tested and all but four American models flunked the federal government's crash safety tests, the National Highway Traffic Safety Administration reported yesterday.

The only cars that passed all the tests were:

Chevrolet Citation and the similarly built Pontiac Phoenix, Oldsmobile Omega and Buick Skylark; Dodge Omni and Plymouth Horizon; Ford Mustang and Mercury Capri; Dodge Magnum and Chrysler Cordoba.

People riding in the cars that failed the toughest tests, "would probably have been killed or very seriously injured" in a 35-mile-an-hour, head-on crash, said Joan Claybrook the agency's administrator.

But in the cars that passed the tests, a passenger or driver wearing a shoulder harness probably would survive with no more than minor injuries, she said.

Claybrook said the government tests showed American manufacturers have proved they can make small cars that are safe and get good gas mileage.

The models that stood out in the tests, she noted, were the latest small cars from Detroit -- General Motors' frontwheel drive x-cars, Chrysler's Omini/Horizon and Ford's latest version of the Mustang and its twin-sister Capri.

"It seems to me that one of the selling points the companies could be stressing is the additional safety that is built into the American car," added Claybrook, whom is not known for saying nice things about Detroit.

The small safe cars are the product of the U.S. auto industry's massive down-sizing program and were designed to meet tougher federal crash standards that go into effect in 1982, he said.

The top-rated small American models also are selling best in the midst of the current slump in auto sales.

Claybrook said the Volkswagen Rabbit "came close" to passing the NHTSA tests but "the Japanese have a long way to go" to build a car as safe as the best small American models.

To emphasize the importance of safe cars the highway safety agency released 1979 traffic death toll statistics, showing that for the second year in a row more than 50,000 persons were killed on American highways.

The death rate went up to 50,745 persons, Claybrook said, "despite a small decrease in the number of miles traveled, a shortage of gasoline during part of the heavily traveled summer months and a substantial increase in prices for fuel."

The motorcycle death toll jumped 6.4 percent last year, pickup and van deaths were up 7 percent and heavy truck deaths increased 4 percent.

Passenger car deaths were down, and Claybrook said the agency estimates 64,000 lives have been saved in the past 10 years by federal safety standards.

In two years of tests, the agency crashed 33 different cars, representing the most popular sellers. The cars tested and the virtually identical versions sold under other model names account for 85 percent of the cars made in the United States and 40 percent of those imported in 1978.

The crashworthiness tests results announced yesterday are based on even more stringent federal standards that go into effect in two years.

While cars are now supposed to protect occupants in a 30-mile-an-hour front-end collision, the private testing labs hired by the government slammed cars into a barricade at 35 miles an hour.

Two adultsize dummies riding in the front seats with the standard restraint systems were wired to record the impact of the crash. Another dummy, simulating a 6-year-old child, gave measurements on back-seat safety.

To see what happens in a rear-end collision, the scientists also slammed each car with a 4,000-pound movable gate at 35 mph, then checked to see if the gas tank leaked.

The cars that flunked the rear-end test were the Volkswagen Rabbit, the Olds Cutlass Supereme, Pontiac Grand Prix, Chevrolet Malibu, Olds 98 Regency, Buick Electra, Buick Riviera, Ford LTD II, ford Thunderbird, Chrysler LeBaron and Dodge Diplomat.

In the front-end crash test, the NHTSA study measured four factors: Were the passengers protected? Did the windshield pop out (allowing passengers without set belts to do likewise?) Were parts of the car forced back through the windshield? Did the gas tank leak?

Only seven models -- all of them made in the United States -- passed the occupant protection standards which NHTSA officials said were the most important.

They were the Chevrolet Chevette, Omni/Horizon, Mustang/Capri, Citation/Omega/Phoenix/Skylark, Olds Cutlass Supreme/Pontiac Grand Prix, Buick Riviera, Dodge Magnum/Chrysler Cordoba and Lincoln Continental.

Cars that failed to meet the 35 mph occupant protection standard were:

Datsun 210, VW Rabbit, Honda Civic, Ford Fiesta, Plymouth Champ/dodge Colt, Ford Pinto/Mercury Bobcat, Toyota Celica, Chevrolet Monza, Pontiac Firebird/Chevrolet Camaro, Ford Fairmont/Mercury Monarch, Plymouth Volare/Dodge Aspen, AMC Concord, Volvo 244DL, Chevrolet Impala/ Pontiac Catalina, Chevrolet Malibu/Olds 98 Regency/Buick Electra, Ford LTD, Ford LTD II/Thunderbird, Mercury Marquis/Ford LTD landau,Chrysler LeBaron/Dodge Diplomat, Dodge St. Regis/ Chrysler/Newport.

These cars failed either front-crash windshield retention, windshield intrusion or fuel leakage tests:

Honda Civic, windshield intrustion; Chevrolet Chevette, winshield retention; Buick Riviera, fuel leak; Lincoln Continental, windshield intrusion.