So please help me in this tow things:
1- disable the cache for this widget.
2- make the right condition using the plugin or any better way to can control when I want to show the widget and when I want to hide it.
0. You already have access to the content's properties. $this->content->getUsername(); $this->content->isSection(); etc. Look at the public functions of vBCms_Item_Content & vBCms_Item_Content_Article for the methods you can call.
You really don't need to directly query the database again for on-page content.
1. Caching is done in vBCms_Widget_ExecPhp::getPageView() between lines 174 & 175. For testing, I added the NodeId to the hash to make the cache unique to the current node...you can just comment out the reading of the cache on 175 if you want to.
Edit: In lieu of editing core code, you could also subclass the PHP widget and implement a new getPageView method. You'd have to install a new version of the widget...but it would make your changes less global.