+1 for some kind of mechanism to get the size (height/width) of a widget.
There’s quite a range of size possibilities, as documented by Apple here: https://developer.apple.com/design/human-interface-guidelines/ios/system-capabilities/widgets/#adapting-to-different-screen-sizes. And I doubt that covers all of the possibilities, either.
Here’s an example where having size details would make a difference. The weather widget that a lot of folks have been sharing around and customizing uses hard-coded size values. It also doesn’t calculate an even distribution of data points for the graph, if you change the number of points. Because, once you’re hard-coding the width of the widget, why not hard-code the spacing between them, too. Which is a shame, because once you have width and number of points, that’s pretty simple math. Even I can do it. 
Maybe we can’t have exact pixels directly, but surely there’s an heuristic that could be calculated based on screen size, zoom settings, and other factors that influence the size a widget is ultimately rendered at? Even a “predicted size” would be more useful than needing to hard-code widths into the widget code itself. It might not cover every case, but it would cover more cases than are covered today.