Error with Python script when run using `--background`
The size argument doesn't exist for this operator in Blender 2.79, it's called radius.

Blender 2.79:

import bpy

bpy.ops.mesh.primitive_plane_add(radius=1, location=(0, 0, 0))


Blender 2.80:

import bpy

bpy.ops.mesh.primitive_plane_add(size=1, location=(0, 0, 0))


The following links take you to the documentation of the function in Blender 2.80 and Blender 2.79.