73% xml-import

Code Review | XML Import

WordPress plugin XML Import scored73%from 54 tests.

About plugin

  • Plugin page: xml-import
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2016
  • Latest release: Mar 1, 2016
  • Number of updates: 15
  • Update frequency: every 3.6 days
  • Top authors: dirlikdesigns (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /6,897 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼8.10ms] Passed 4 tests

An overview of server-side resources used by XML Import
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1736.70 ▼2.37
Dashboard /wp-admin3.47 ▲0.1646.85 ▼5.31
Posts /wp-admin/edit.php3.58 ▲0.2345.03 ▼2.95
Add New Post /wp-admin/post-new.php6.05 ▲0.1680.36 ▼21.75
Media Library /wp-admin/upload.php3.39 ▲0.1638.60 ▲6.85
Add New /wp-admin/post-new.php?post_type=xmli_feed3.4342.84
All Feeds /wp-admin/edit.php?post_type=xmli_feed3.4332.82

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for XML Import
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.14 ▼1.451.72 ▲0.0740.89 ▲0.83
Dashboard /wp-admin2,233 ▲485.79 ▲0.8796.53 ▼8.2340.49 ▼4.97
Posts /wp-admin/edit.php2,116 ▲272.02 ▲0.0138.52 ▲1.0431.62 ▼4.58
Add New Post /wp-admin/post-new.php1,543 ▲2423.39 ▲0.33637.20 ▼37.9057.30 ▼9.03
Media Library /wp-admin/upload.php1,418 ▲304.22 ▲0.0198.93 ▼5.3042.64 ▼6.02
Add New /wp-admin/post-new.php?post_type=xmli_feed1,9752.8167.5554.52
All Feeds /wp-admin/edit.php?post_type=xmli_feed1,0802.0134.2932.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=xmli_feed
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/xml-import/includes/class-xml-import.php+1142
    simplexml_load_file(): I/O warning : failed to load external entity "wp-content/plugins/xml-import/tmp/.11.xml"
    • > GET request to /wp-admin/post-new.php?post_type=xmli_feed
    • > POST request to /wp-admin/admin-ajax.php
    • > Error in wp-content/plugins/xml-import/includes/class-xml-import.php+1145
    Uncaught Error: Call to a member function getName() on bool in wp-content/plugins/xml-import/includes/class-xml-import.php:1145
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): XML_Import->get_level()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin-ajax.php(188): do_action()
    #4 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/xml-import/xml-import.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=xmli_feed
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: custom post, meta fields, import, xml

xml-import/xml-import.php Passed 13 tests

The principal PHP file in "XML Import" v. 1.0.4 is loaded by WordPress automatically on each request
49 characters long description:
Import XML Feeds and map result on (custom) posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,192 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2266611,016
PO File14344107
CSS10069

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity88.00
▷ Minimum class complexity88.00
▷ Maximum class complexity88.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2996.67%
▷ Protected methods13.33%
▷ Private methods00.00%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin