67% wp-import-export-lite

Code Review | WP Import Export Lite

WordPress plugin WP Import Export Lite scored 67% from 54 tests.

About plugin

  • Plugin page: wp-import-export-...
  • Plugin version: 3.9.26
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jul 27, 2019
  • Latest release: Sep 28, 2023
  • Number of updates: 191
  • Update frequency: every 8.0 days
  • Top authors: vjinfotech (100%)

Code review

54 tests

User reviews

85 reviews

Install metrics

40,000+ active / 570,750 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.99MB] [CPU: ▲9.20ms] Passed 4 tests

Analyzing server-side resources used by WP Import Export Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.46 ▲0.9947.39 ▲3.38
Dashboard /wp-admin4.31 ▲1.0066.77 ▲11.87
Posts /wp-admin/edit.php4.36 ▲1.0065.65 ▲16.15
Add New Post /wp-admin/post-new.php6.89 ▲1.00105.74 ▲5.39
Media Library /wp-admin/upload.php4.22 ▲0.9953.77 ▲18.51
New Import /wp-admin/admin.php?page=wpie-new-import4.5161.56
Extensions /wp-admin/admin.php?page=wpie-extensions4.2249.50
Manage Export /wp-admin/admin.php?page=wpie-manage-export4.3348.08
Settings /wp-admin/admin.php?page=wpie-settings4.3451.33
Manage Import /wp-admin/admin.php?page=wpie-manage-import4.3348.17
New Export /wp-admin/admin.php?page=wpie-new-export4.3748.95

Server storage [IO: ▲17.90MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 2 files (0.80KB) outside of "wp-content/plugins/wp-import-export-lite/" and "wp-content/uploads/"
    • (new file) robots.txt
    • (modified) .htaccess
Filesystem: 1,887 new files
Database: 1 new table, 13 new options
New tables
wp_wpie_template
New WordPress options
wpie_plugin_version
wpie_is_updated_file_security
widget_recent-comments
wpie_install_date
widget_recent-posts
wpie_bg_and_cron_processing
theysaidso_admin_options
wpie_flush_rewrite_rules
wpie_is_admin_notice_clear
wpie_db_version
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Import Export Lite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8914.71 ▲0.291.93 ▲0.1438.03 ▼5.99
Dashboard /wp-admin2,244 ▲565.89 ▲1.00115.43 ▼0.9440.51 ▼4.14
Posts /wp-admin/edit.php2,127 ▲352.02 ▼0.0242.01 ▼2.9032.94 ▼2.92
Add New Post /wp-admin/post-new.php1,556 ▲1423.34 ▲5.09613.50 ▼18.8051.16 ▼4.25
Media Library /wp-admin/upload.php1,420 ▲324.22 ▲0.03100.01 ▼9.7639.76 ▼1.97
New Import /wp-admin/admin.php?page=wpie-new-import2,7153.0678.5492.39
Extensions /wp-admin/admin.php?page=wpie-extensions1,9032.0929.8745.79
Manage Export /wp-admin/admin.php?page=wpie-manage-export1,0682.0233.1441.00
Settings /wp-admin/admin.php?page=wpie-settings1,2612.2339.1334.39
Manage Import /wp-admin/admin.php?page=wpie-manage-import1,0752.0333.1937.68
New Export /wp-admin/admin.php?page=wpie-new-export2,2982.9350.4833.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_wpie_template
  • The uninstall procedure has failed, leaving 13 options in the database
    • wpie_install_date
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • wpie_bg_and_cron_processing
    • db_upgraded
    • wpie_is_admin_notice_clear
    • wpie_db_version
    • wpie_plugin_version
    • wpie_is_updated_file_security
    • ...

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-import-export-lite/vendor_deprecated/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/wp-import-export-lite/vendor_deprecated/markbaker/complex/examples/complexTest.php
    • > /wp-content/plugins/wp-import-export-lite/vendor_deprecated/markbaker/complex/examples/testOperations.php
    • > /wp-content/plugins/wp-import-export-lite/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/wp-import-export-lite/vendor_deprecated/markbaker/complex/examples/testFunctions.php
  • 739× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Calculation\\Statistical\\MaxMinBase' not found in wp-content/plugins/wp-import-export-lite/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Minimum.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Worksheet\\Dimension' not found in wp-content/plugins/wp-import-export-lite/vendor_deprecated/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowDimension.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-import-export-lite/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\umberFormat\\BaseFormatter' not found in wp-content/plugins/wp-import-export-lite/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/PercentageFormatter.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIFilter' not found in wp-content/plugins/wp-import-export-lite/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/Munge.php:3
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/wp-import-export-lite/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/wp-import-export-lite/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php:7
    • > PHP Fatal error
      Cannot declare interface SessionUpdateTimestampHandlerInterface, because the name is already in use in wp-content/plugins/wp-import-export-lite/vendor_deprecated/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/wp-import-export-lite/vendor_deprecated/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrTransform' not found in wp-content/plugins/wp-import-export-lite/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

wp-import-export-lite/wp-import-export-lite.php 92% from 13 tests

This is the main PHP file of "WP Import Export Lite" version 3.9.26, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 187 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin239,500 lines of code in 1,587 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,44544,97094,986214,178
Markdown503,602011,045
SVG5009,567
JSON30003,582
YAML1313412592
JavaScript13522198
XML7152152
reStructuredText9119243126
Bourne Again Shell16324
CSS1152916
Dockerfile18010
make1409
INI1111

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,020)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity25.08
▷ Minimum class complexity1.00
▷ Maximum class complexity1,020.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces141
Interfaces67
Traits6
Classes1,227
▷ Abstract classes665.38%
▷ Concrete classes1,16194.62%
▷ Final classes645.51%
Methods10,883
▷ Static methods2,78225.56%
▷ Public methods8,08974.33%
▷ Protected methods5154.73%
▷ Private methods2,27920.94%
Functions442
▷ Named functions18642.08%
▷ Anonymous functions25657.92%
Constants2,521
▷ Global constants793.13%
▷ Class constants2,44296.87%
▷ Public constants2,26392.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%
assets/images/chosen-sprite.png0.53KB0.88KB0.00%
assets/images/sort_asc.png0.16KB0.25KB0.00%