68% csv-to-db

Code Review | CSV To DB

WordPress plugin CSV To DB scored68%from 54 tests.

About plugin

  • Plugin page: csv-to-db
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Mar 29, 2022
  • Latest release: Mar 29, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wlady2001 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,289 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.61MB] [CPU: ▼48.41ms] Passed 4 tests

Analyzing server-side resources used by CSV To DB
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0837.84 ▲1.74
Dashboard /wp-admin2.34 ▼1.0011.18 ▼46.70
Posts /wp-admin/edit.php2.35 ▼1.0111.28 ▼36.47
Add New Post /wp-admin/post-new.php2.34 ▼3.5510.29 ▼87.99
Media Library /wp-admin/upload.php2.35 ▼0.8812.11 ▼22.48
CSV To DB /wp-admin/admin.php?page=wp-csv-to-db2.3512.10
Settings /wp-admin/admin.php?page=wp-csv-to-db-settings2.3510.95
Fields /wp-admin/admin.php?page=wp-csv-to-db-fields2.359.84
Import /wp-admin/admin.php?page=wp-csv-to-db-import2.3512.77

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

A short overview of filesystem and database impact
Just a few items left to fix
  • Total filesystem usage must be limited to 25MB (currently using 31.43MB)
Filesystem: 309 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
csv2db
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for CSV To DB
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲11215.57 ▲1.271.54 ▼0.2643.62 ▲1.10
Dashboard /wp-admin2,264 ▲766.73 ▲1.85153.88 ▲47.6035.92 ▼12.08
Posts /wp-admin/edit.php2,126 ▲373.89 ▲1.8953.86 ▲16.7631.52 ▼3.81
Add New Post /wp-admin/post-new.php1,718 ▲20426.50 ▲9.02697.12 ▲1.7128.09 ▼28.95
Media Library /wp-admin/upload.php1,520 ▲1325.70 ▲1.60117.16 ▲14.0638.24 ▼3.52
CSV To DB /wp-admin/admin.php?page=wp-csv-to-db8153.4945.8521.53
Settings /wp-admin/admin.php?page=wp-csv-to-db-settings9263.4345.6224.54
Fields /wp-admin/admin.php?page=wp-csv-to-db-fields9343.5245.1520.38
Import /wp-admin/admin.php?page=wp-csv-to-db-import8153.4540.9423.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the a3dd93b0e53c9f6bed8593c07c5048e6 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • csv2db
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the a3dd93b0e53c9f6bed8593c07c5048e6 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the 7747e36d993dcb03180d6e3b562a6fd6 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the 49580fcfe004144de69a31d70e4b86dc handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the 61c12392aa265c17e197c71a14140268 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the 13c6b36ab0eb694ea5823e30912fce59 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the e26a4add0a3f5a45a40f20e78f23ea1a handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the 43fbdf0befda14aa58e1376719c742f9 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fec63fc99f315558ec2b991ca43d435b handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the 08194decbb3523d2db532032cc6c2f4a handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the e9864f0919d3ddc380c5ec0060fdc610 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-csv-to-db-import
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the d3ef60f427d1dd0ec3dd79cd6906fca0 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% 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
The following issues need your attention
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'CSV2DB\\Options' not found in wp-content/plugins/csv-to-db/src/CSV2DB/Controllers/Front.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/csv-to-db/src/views/items.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/csv-to-db/src/views/fields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/csv-to-db/src/views/attachment.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_send_json() in wp-content/plugins/csv-to-db/src/views/json.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CSV2DB\\Options' not found in wp-content/plugins/csv-to-db/src/CSV2DB/Controllers/Admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/csv-to-db/src/views/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/csv-to-db/src/views/error.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/csv-to-db/src/views/import.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CSV2DB\\Base' not found in wp-content/plugins/csv-to-db/src/CSV2DB/Options.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === csv-to-db === )
You can take inspiration from this readme.txt

csv-to-db/csv-to-db.php 92% from 13 tests

"CSV To DB" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin135,594 lines of code in 270 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript19419,37514,57492,284
CSS428,68028039,190
PHP252596381,825
JSON5001,776
Markdown2830334
PO File16776157
SVG10028

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity18.45
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods87
▷ Static methods3337.93%
▷ Public methods8294.25%
▷ Protected methods22.30%
▷ Private methods33.45%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants13
▷ Global constants1292.31%
▷ Class constants17.69%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin