84% advanced-csv-importer

Code Review | Advanced CSV Importer

WordPress plugin Advanced CSV Importer scored84%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: 6.3.1
  • 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

60+ active /5,875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.63ms] Passed 4 tests

Analyzing server-side resources used by Advanced CSV Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0946.95 ▲4.31
Dashboard /wp-admin3.39 ▲0.0447.03 ▼20.67
Posts /wp-admin/edit.php3.50 ▲0.1451.17 ▲2.73
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.97 ▼17.21
Media Library /wp-admin/upload.php3.31 ▲0.0837.47 ▲0.62

Server storage [IO: ▲0.14MB] [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: 82 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Advanced CSV Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.33 ▼0.231.81 ▼0.1639.98 ▼1.99
Dashboard /wp-admin2,195 ▲185.60 ▼0.0091.43 ▲0.0541.47 ▼3.17
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0234.61 ▼3.5040.54 ▲2.80
Add New Post /wp-admin/post-new.php1,526 ▼023.61 ▲0.44677.54 ▼48.2054.82 ▼1.88
Media Library /wp-admin/upload.php1,400 ▼34.28 ▲0.1195.02 ▼5.9142.04 ▼4.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/example/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/example/import_from_database_via_pdo.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/Protocol/LexerTest.php:10
    • > 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
      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/export_from_database_via_pdo.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/Export/Tests/Standard/Join/Collection/PdoCollectionTest.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-csv-importer/advanced-csv-importer.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Goodby\\CSV\\Import\\Protocol\\LexerInterface' not found in wp-content/plugins/advanced-csv-importer/vendor/goodby/csv/src/Goodby/CSV/Import/Standard/Lexer.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/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/Protocol/InterpreterTest.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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: wp-cli, csv, import

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

"Advanced CSV Importer" version 0.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
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 logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin