94% advanced-csv-importer

Code Review | Advanced CSV Importer

WordPress plugin Advanced CSV Importer scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-csv-impo...
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 5.9.2
  • First release: Dec 29, 2014
  • Latest release: Apr 24, 2015
  • Number of updates: 11
  • Update frequency: every 10.6 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 5,560 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼291.04ms] Passed 4 tests

Server-side resources used by Advanced CSV Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1556.46 ▲2.48
Dashboard /wp-admin3.50 ▲0.0935.48 ▲0.75
Posts /wp-admin/edit.php3.72 ▲0.0839.16 ▲1.30
Add New Post /wp-admin/post-new.php6.99 ▼0.0198.44 ▼1,168.67
Media Library /wp-admin/upload.php3.38 ▲0.0827.39 ▲3.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 82 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced CSV Importer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.98 ▲0.205.81 ▼1.062.55 ▼1.14
Dashboard /wp-admin2,895 ▲346.15 ▼0.02119.21 ▼18.05155.50 ▼13.72
Posts /wp-admin/edit.php2,694 ▲213.24 ▼0.0164.44 ▲1.24144.16 ▲1.79
Add New Post /wp-admin/post-new.php1,700 ▲3920.64 ▲3.84428.18 ▲18.24158.36 ▲1.73
Media Library /wp-admin/upload.php1,701 ▲35.50 ▲0.02144.97 ▲4.28194.47 ▲5.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Import/Tests/Standard/Unit/Observer/SqlObserverTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Export/Tests/Protocol/ExporterInterfaceTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Import/Tests/Standard/Unit/InterpreterTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Import/Tests/Standard/Join/LexerTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Export/Tests/Standard/Unit/ExporterConfigTest.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/example/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/example/tsv-sample.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Import/Tests/Standard/Unit/LexerConfigTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Import/Tests/Standard/Join/Observer/PdoObserverTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Importer' not found in wp-content/plugins/advanced-csv-importer/lib/ACSV/Importer.php:7
    • > PHP Warning
      require_once(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/phpunit-bootstrap.php on line 3

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: import, wp-cli, csv

advanced-csv-importer/advanced-csv-importer.php 92% from 13 tests

The main file in "Advanced CSV Importer" v. 0.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,459 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP577711,0182,900
Markdown21330320
JSON300160
XML13443
Bourne Shell111124
YAML11012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.59
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces28
Interfaces3
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods230
▷ Static methods4017.39%
▷ Public methods20488.70%
▷ Protected methods31.30%
▷ Private methods2310.00%
Functions19
▷ Named functions210.53%
▷ Anonymous functions1789.47%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin