78% import-csv-and-create-users

Code Review | CSV User Import with custom email message

WordPress plugin CSV User Import with custom email message scored78%from 54 tests.

About plugin

  • Plugin page: import-csv-and-cr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.7.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2013
  • Latest release: Nov 20, 2013
  • Number of updates: 9
  • Update frequency: every 4.0 days
  • Top authors: n4thaniel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,761 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by CSV User Import with custom email message
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.66 ▲2.04
Dashboard /wp-admin3.31 ▲0.0150.88 ▲5.25
Posts /wp-admin/edit.php3.36 ▲0.0045.52 ▲0.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.88 ▼9.74
Media Library /wp-admin/upload.php3.23 ▲0.0035.26 ▲1.69
Import from CSV /wp-admin/users.php?page=csv-user-import3.1730.59

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for CSV User Import with custom email message
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.74 ▲0.451.77 ▲0.2144.15 ▼6.35
Dashboard /wp-admin2,210 ▲224.87 ▼0.03111.84 ▲0.0343.28 ▲2.49
Posts /wp-admin/edit.php2,090 ▼61.99 ▼0.0536.60 ▼2.6830.70 ▼1.44
Add New Post /wp-admin/post-new.php1,536 ▲2223.22 ▲5.77647.31 ▲48.8958.11 ▲4.82
Media Library /wp-admin/upload.php1,392 ▲74.15 ▼0.0398.86 ▼1.5641.96 ▼1.51
Import from CSV /wp-admin/users.php?page=csv-user-import8322.0525.3637.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/users.php?page=csv-user-import
    • > Notice in wp-content/plugins/import-csv-and-create-users/import-users-csv.php+33
    Undefined index: role
    • > GET request to /wp-admin/users.php?page=csv-user-import
    • > Notice in wp-content/plugins/import-csv-and-create-users/import-users-csv.php+48
    Undefined index: mode
    • > GET request to /wp-admin/users.php?page=csv-user-import
    • > Notice in wp-content/plugins/import-csv-and-create-users/import-users-csv.php+204
    Undefined variable: html_update
    • > GET request to /wp-admin/users.php?page=csv-user-import
    • > Notice in wp-content/plugins/import-csv-and-create-users/import-users-csv.php+205
    Undefined variable: error
    • > GET request to /wp-admin/users.php?page=csv-user-import
    • > Notice in wp-content/plugins/import-csv-and-create-users/import-users-csv.php+242
    Undefined variable: log_message

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
The following issues need your attention
  • 1× 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/import-csv-and-create-users/import-users-csv.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === import-csv-and-create-users === )
The official readme.txt is a good inspiration

import-csv-and-create-users/import-users-csv.php 92% from 13 tests

The entry point to "CSV User Import with custom email message" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("import-csv-and-create-users.php" instead of "import-users-csv.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected189 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14324178
JavaScript13011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin