There is nothing wrong with your macro - the problem is only that DockWidth does not currently have a numeric value. It is currently the empty string - when you run the macro, it will become 52, but Keyboard Maestro does not understand that. As soon as it becomes 52, the DockWidth will turn black in your Move & Resize Front Window action. If you click the Try button on the action, it will become 52 and then the DockWidth will turn black.
I changed version 7 so that instead of red, it displays orange where the calculation could be correct if the variable had a different value (I also added a SCREENVISIBLE function that takes in to account the menu and dock).