84% csv-importer-improved

Code Review | CSV Importer Improved

WordPress plugin CSV Importer Improved scored 84% from 54 tests.

About plugin

  • Plugin page: csv-importer-impr...
  • Plugin version: 0.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2015
  • Latest release: Oct 10, 2016
  • Number of updates: 21
  • Update frequency: every 14.2 days
  • Top authors: judgej (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 10,397 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.75ms] Passed 4 tests

Server-side resources used by CSV Importer Improved
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.33 ▼1.78
Dashboard /wp-admin3.31 ▲0.0151.18 ▼1.45
Posts /wp-admin/edit.php3.36 ▲0.0048.48 ▲5.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.52 ▲4.43
Media Library /wp-admin/upload.php3.23 ▲0.0037.27 ▲1.81
CSV Importer Improved /wp-admin/tools.php?page=csv-importer-improved/csv_importer.php3.2135.21

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
csv_importer_import_as_draft
csv_importer_cat
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

CSV Importer Improved: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.301.55 ▼0.4138.31 ▼4.37
Dashboard /wp-admin2,207 ▲555.86 ▲0.15110.05 ▲10.5242.20 ▼0.01
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0140.26 ▲2.6032.94 ▼0.98
Add New Post /wp-admin/post-new.php1,536 ▲1623.16 ▼0.01690.62 ▲22.0954.45 ▲1.23
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.0496.50 ▼0.5244.22 ▲1.06
CSV Importer Improved /wp-admin/tools.php?page=csv-importer-improved/csv_importer.php8272.0323.7331.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • csv_importer_import_as_draft
    • db_upgraded
    • csv_importer_cat
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csv-importer-improved/examples/functions.inc.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csv-importer-improved/csv_importer.php:823
    • > PHP Warning
      require_once(PHPUnit/Framework.php): failed to open stream: No such file or directory in wp-content/plugins/csv-importer-improved/File_CSV_DataSource/tests/File_CSV_DataSourceTest.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Framework.php' (include_path='.:/usr/share/php') in wp-content/plugins/csv-importer-improved/File_CSV_DataSource/tests/File_CSV_DataSourceTest.php on line 2

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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (Plugin interface) image required
You can take inspiration from this readme.txt

csv-importer-improved/csv_importer.php 92% from 13 tests

"CSV Importer Improved" version 0.6.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("csv-importer-improved.php" instead of "csv_importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,354 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP53211,9392,354

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity62.33
▷ Minimum class complexity3.00
▷ Maximum class complexity108.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods120
▷ Static methods00.00%
▷ Public methods11293.33%
▷ Protected methods86.67%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.18KB10.93KB▼ 52.82%