the plugin is trying to stay backwards-compatible so is using an old approach to multiple instances of a widget, and is registering the widget twice. the second time every time the widget admin interface loads just in case the number of widgets has changed, and this is AFTER widget logic has stepped in to add its controls, so this gets reset for that widget.
i don't quite know how to make code like this work 100% but one workaround is to make it only do the re-register when the number of widgets changes. change
function spw_admin_setup() {
$options = get_option('samsarin_php_widget');
if (isset($_POST['samsarin_php_widget_number_submit'])) {
$number = (int) $_POST['samsarin_php_widget_number'];
if ( $number < 1 ) $number = 1;
if ($number > SPW_MAXWIDGETS) $number = SPW_MAXWIDGETS;
$options['number'] = $number;
}
update_option('samsarin_php_widget', $options);
spw_register_plugin($options['number']);
}
to
function spw_admin_setup() {
$options = get_option('samsarin_php_widget');
if (isset($_POST['samsarin_php_widget_number_submit'])) {
$number = (int) $_POST['samsarin_php_widget_number'];
if ( $number < 1 ) $number = 1;
if ($number > SPW_MAXWIDGETS) $number = SPW_MAXWIDGETS;
$options['number'] = $number;
update_option('samsarin_php_widget', $options);
spw_register_plugin($options['number']);
}
}
when you set the number of widgets you lose the widget logic field, but if you then reload the page it's back.