For the Ribbon status, just use some apis from AdWindows.dll which ships with Revit. You can easily find it in Revit root folder.
Use Autodesk.Revit.Windows.ComponentManager.Ribbon to get the RibbonControl instance.
The RibbonControl.AutoHideMode property and RibbonControl.AutoHideModeChanged event will satisfy your need.
As to the RibbonHeight, use the RibbonControl.ActiveTab.Panels.FirstOrDefault() to get a RibbonPanel.
Then it's easy to get the height.
The option bar is not WPF UI which makes it hard to manipulate as far as I can tell. The only clue I can share is, by referencing UIFrameworkServices.dll, you can have access to limited operations using DialogBarService class.