List sub pages

Does not work all the way. But it will list all the pages in the widget
and if there is any featured image it will show it. Im not a PHP
developer and I worked on it for 6h. I tried to understand how you
create a plugin and widget. Never done it before.