General refactoring suggestions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Start by reviewing the WXR_Parser* classes and the WP_Import entry point, then separate the listed suggestions into independently scoped changes. Done means an agreed subset of the interface, visibility, property, naming, parser, and WP_Import refactors is implemented without leaving the remaining scope ambiguous.
Written by the indexing model from the issue text.
Description
In doing #31, I made a note of a few general items that may improve the codebase. In no particular order:
- Add interface, with
parse()thatWXR_Parser*classes can implement. - Make other properties and methods non-public.
- Add
$has_gzipproperty toWXR_Parser_Regex. - Add ~12 missing properties to
WXR_Parser_XML(or to interface). - Rename
WXR_Parser*classes to use prefix. - Refactor
// phpcs:ignoreinWXR_Parser_Regex(messy code I didn't want/need to touch in #31) - Split WP_Import so that it is polymorphic to handle how different versions handle things differently.
- Dominant language
- PHP
- Stars
- 89
- Forks
- 96
- Avg merge
- 1h 13m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WordPress/wordpress-importer
-
PHP 8.5 compatible Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100
WordPress/wordpress-importer#260 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
WordPress/wordpress-importer#212 ·
-
[Type] Bug needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
WordPress/wordpress-importer#266 ·
-
Webp is not working Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
WordPress/wordpress-importer#257 ·
All issues in WordPress/wordpress-importer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100