84% wp-csv-to-database

Code Review | WP CSV to Database - Insert CSV file content into WordPress database

WordPress plugin WP CSV to Database - Insert CSV file content into WordPress database scored 84% from 54 tests.

About plugin

  • Plugin page: wp-csv-to-database
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 5.8.1
  • First release: Mar 28, 2010
  • Latest release: Mar 10, 2021
  • Number of updates: 34
  • Update frequency: every 117.7 days
  • Top authors: mra13 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active / 56,710 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 gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼140.27ms] Passed 4 tests

An overview of server-side resources used by WP CSV to Database - Insert CSV file content into WordPress database
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2236.02 ▲13.98
Dashboard /wp-admin3.17 ▲0.1253.28 ▲3.25
Posts /wp-admin/edit.php3.22 ▲0.1249.22 ▲3.23
Add New Post /wp-admin/post-new.php5.53 ▲0.1093.18 ▼567.73
Media Library /wp-admin/upload.php3.11 ▲0.1134.30 ▲0.16
WP CSV/DB /wp-admin/options-general.php?page=wp_csv_to_db_menu_page3.0932.08

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
wp_csv_to_db

Browser metrics Passed 4 tests

WP CSV to Database - Insert CSV file content into WordPress database: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲10215.90 ▲0.6110.28 ▲0.8146.36 ▼1.60
Dashboard /wp-admin2,978 ▲446.08 ▼0.08138.69 ▼24.70108.01 ▼5.41
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0264.20 ▼7.0387.94 ▲6.07
Add New Post /wp-admin/post-new.php3,580 ▼12014.82 ▼3.83481.71 ▲0.75102.75 ▼12.33
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.02156.56 ▼2.17111.90 ▲0.37
WP CSV/DB /wp-admin/options-general.php?page=wp_csv_to_db_menu_page1,9172.9584.71121.25

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
  • Zombie WordPress options detected upon uninstall: 1 option
    • wp_csv_to_db

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-csv-to-database/main.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: importer, excel, csv file to wordpress database, spreadsheet, csv...

wp-csv-to-database/main.php 92% from 13 tests

The primary PHP file in "WP CSV to Database - Insert CSV file content into WordPress database" version 2.6 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-csv-to-database.php" instead of "main.php")

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
Everything looks great! No dangerous files found in this plugin901 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP111195549
PO File15050161
JavaScript14247142
CSS18049

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity6.55
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/success.png4.34KB1.51KB▼ 65.32%
images/warning.png4.46KB1.51KB▼ 66.10%
images/error.png4.24KB1.48KB▼ 65.18%
images/info.png4.30KB1.51KB▼ 64.82%