The Metadata API must be used to extract the information you need:
-Tabs can be extracted as CustomTab metadata, and related configuration can be located in Profiles or Permission Sets as tabVisibilities, and can also be located in CustomApplication metadata as available tabs
-Apex code can be extracted as ApexClass or ApexTrigger metadata types
To export metadata from an org, you can use a tool such as Workbench (https://workbench.developerforce.com/login.php) and use a package.xml manifest that specifies ApexClass and CustomTab as elements within. You can produce a package manifest from following the details in (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm) or by using an automatic package builder such as (https://packagebuilder.herokuapp.com/)