equalizedigital / accessibility-checker

GNU General Public License v2.0
15 stars 8 forks source link

Refactor EDAC\Admin\Ajax class #579

Closed pattonwebz closed 2 weeks ago

pattonwebz commented 4 months ago

This class is very complex (in terms of readability and cognitive complexity) — higher than any other class in the plugin by a long way.

We should consider breaking this up into smaller chunks

  1. Moving the large chunks of markup to partials.
  2. Check for functionality that can be extracted or reused from elsewhere to prevent duplication.
  3. Breaking up the large methods to multiple smaller, testable, ones.

Additionally, it is worth considering whether we can shift a lot of this over to rest endpoints rather than relying on AJAX for all of this.

SteveJonesDev commented 2 weeks ago

Issue moved to our internal system.