Magento2 Smartwave Megamenu error in categories admin

After Porto theme removal (which includes Smartwave Megamenu), when accessing Categories page in the backend, you get an error report which contains:

Class Smartwave\\Megamenu\\Model\\Attribute\\Width does not exist

This is because the extension added new category attributes that reference source models which have been removed.

To solve it, first DO A BACKUP of the database, then run this query to see which attributes reference Smartwave models:

SELECT attribute_id FROM eav_attribute
WHERE source_model LIKE 'Smartwave%'
AND entity_type_id IN (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_category');

Now take each obtained id and run it through a select query to see exactly what each attribute is:

SELECT * FROM `eav_attribute` WHERE attribute_id = ;

Finally you can delete each attribute:

DELETE FROM eav_attribute WHERE attribute_id = ;

Other than categories, you may run into problems when trying to add certain new product types. Like:

Class Smartwave\\Porto\\Model\\Attribute\\Productpagetype does not exist

So, continue with this more generic query:

SELECT attribute_id FROM eav_attribute WHERE source_model LIKE 'Smartwave%'

and repeat the select and delete steps as before.