84% wp-smart-import

Code Review | WP Smart Import : Import any XML File to WordPress

WordPress plugin WP Smart Import : Import any XML File to WordPress scored84%from 54 tests.

About plugin

  • Plugin page: wp-smart-import
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 24, 2018
  • Latest release: Jul 26, 2023
  • Number of updates: 27
  • Update frequency: every 70.0 days
  • Top authors: xylus (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /48,390 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼3.00ms] Passed 4 tests

This is a short check of server-side resources used by WP Smart Import : Import any XML File to WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.33 ▲2.60
Dashboard /wp-admin3.79 ▲0.4950.85 ▲0.21
Posts /wp-admin/edit.php3.83 ▲0.4750.35 ▲5.43
Add New Post /wp-admin/post-new.php6.42 ▲0.5480.05 ▼13.28
Media Library /wp-admin/upload.php3.67 ▲0.4433.24 ▼1.53
Manage Import /wp-admin/admin.php?page=wp_smart_import_manage3.6536.55
Manage Files /wp-admin/admin.php?page=wp_smart_import_manage_file3.6437.05
New Import /wp-admin/admin.php?page=wp_smart_import3.6436.71

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 61 new files
Database: 3 new tables, 8 new options
New tables
wp_wpsi_files
wp_wpsi_posts
wp_wpsi_imports
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
wp-smart-import-settings
can_compress_scripts
widget_theysaidso_widget
wp-smart-import-session

Browser metrics Passed 4 tests

Checking browser requirements for WP Smart Import : Import any XML File to WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲14113.80 ▼0.582.32 ▲0.4244.93 ▼2.10
Dashboard /wp-admin2,257 ▲695.29 ▲0.38103.92 ▼18.9339.39 ▼5.51
Posts /wp-admin/edit.php2,143 ▲542.33 ▲0.3141.03 ▲4.6134.90 ▼1.11
Add New Post /wp-admin/post-new.php1,558 ▲2617.54 ▼5.90659.54 ▲4.1534.87 ▼27.50
Media Library /wp-admin/upload.php1,439 ▲574.44 ▲0.1499.51 ▲1.8843.15 ▼2.67
Manage Import /wp-admin/admin.php?page=wp_smart_import_manage1,0311.9730.8931.31
Manage Files /wp-admin/admin.php?page=wp_smart_import_manage_file1,0061.9130.1530.22
New Import /wp-admin/admin.php?page=wp_smart_import9841.8830.0133.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 23× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-smart-import/views/admin/import/template/images_import.php:5
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/wp-smart-import/includes/save_post/date.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'wpSmartImportQuery' not found in wp-content/plugins/wp-smart-import/views/admin/manage/edit.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'wpsi_helper' not found in wp-content/plugins/wp-smart-import/views/admin/manage/delete.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_object_taxonomies() in wp-content/plugins/wp-smart-import/includes/save_post/tax_cat_tag.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-smart-import/views/admin/import/template/tax_cat_tag.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'wpsi_manage_controller' not found in wp-content/plugins/wp-smart-import/views/admin/manage/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_object_taxonomies() in wp-content/plugins/wp-smart-import/views/admin/import/template/tax_cat_tag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/wp-smart-import/includes/save_post/image.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-smart-import/views/admin/import/template/content.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: wordpress xml import, wordpress csv import, csv, xml, wordpress importer...

wp-smart-import/wp-smart-import.php Passed 13 tests

This is the main PHP file of "WP Smart Import : Import any XML File to WordPress" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
126 characters long description:
The most powerful solution for importing XML files to WordPress. Create Posts and Pages with content from any XML or CSV file.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin5,559 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP391773203,514
JavaScript348481,033
CSS316231,012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity30.83
▷ Minimum class complexity1.00
▷ Maximum class complexity190.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods117
▷ Static methods5143.59%
▷ Public methods10993.16%
▷ Protected methods32.56%
▷ Private methods54.27%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/js/jquery-ui-1.12.1/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%