Improve Magento extension

Job ID: 32545281

Budget: $10 – $30 USD

I have a custom Magento extension (based on https://webkul.com/blog/create-grid-edit-add-grid-row-and-installer-in-magento2/) to insert and update products from a custom database where the products are stored in 2 seperate tables (1 for product type A and 1 for product type B).
The result is shown in the Magento-admin-panel.
The process is started via cron or manually via the admin-panel.
The project has 4 main methods:
- inserting product type A
- updating product type A
- inserting product type B
- updating product type B

Before the import/update the products are enriched via data from external websites or via methods in the same class.

There's a lot of duplicate code, everything is packed in one class and it takes around 7 seconds for each product to be inserted into Magento.

This needs to be done:
- Clean the code (2000 lines), refactor it over multiple classes and methods, remove duplicate code
- Check if inserting and updating products can be done more efficiently, so it has less impact on caching and reïndexing

What you get:
- A copy of the extension

What I expect
- A copy of the updated extension,
Related categories: PHP Magento MySQL