Is it possible to select all connected or unconnected nodes?
You can use Select Linked To Shift+L and Select Linked From L repeatedly till you have all connected nodes selected. Then you can Inverse selection Ctrl+I to select the unlinked nodes.

Alternatively you can use the following script that will add a Select > Select Linked menu option.

from itertools import chain
import bpy

def get_linked(node, processed=None):
    if processed is None:
        processed = []
    processed.append(node)
    for socket in chain(node.inputs, node.outputs):
        for link in socket.links:
            target = link.from_node if node == link.to_node else link.to_node
            if target not in processed:
                get_linked(target, processed)
    return processed

class NODE_OT_SelectLinked(bpy.types.Operator):
    bl_description="Select all nodes linked to the active node"
    bl_idname = "node.select_linked"
    bl_label = "Select Linked Nodes"
    bl_options = {"REGISTER", "UNDO"}

    @classmethod
    def poll(cls, context):
        return context.active_node

    def execute(self, context):
        for node in get_linked(context.active_node):
            node.select = True
        return {"FINISHED"}

def menu(self, context):
    self.layout.operator("node.select_linked", text="Select Linked")

def register():
    bpy.utils.register_class(NODE_OT_SelectLinked)
    bpy.types.NODE_MT_select.append(menu)

def unregister():
    bpy.utils.unregister_class(NODE_OT_SelectLinked)
    bpy.types.NODE_MT_select.remove(menu)

register()


To auto load: save the above in scripts/startup/ with a .py file extension.