83% csv-custom-content-importer

Code Review | CSV Custom Content Importer

WordPress plugin CSV Custom Content Importer scored 83% from 53 tests.

About plugin

  • Plugin page: csv-custom-conten...
  • Plugin version: 0.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.0.3
  • WordPress version: 5.8.1
  • First release: Feb 14, 2019
  • Latest release: Feb 14, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: lucavicidomini (100%)

Code review

53 tests

User reviews

1 review

Install metrics

30+ active / 571 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼285.64ms] Passed 4 tests

Analyzing server-side resources used by CSV Custom Content Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.61 ▲8.79
Dashboard /wp-admin3.06 ▲0.0144.11 ▼0.59
Posts /wp-admin/edit.php3.11 ▲0.0137.42 ▼9.29
Add New Post /wp-admin/post-new.php5.42 ▼0.0193.86 ▼1,125.50
Media Library /wp-admin/upload.php3.00 ▼0.0031.29 ▼7.17
CSV Custom Content Importer /wp-admin/tools.php?page=csv-custom-content-importer3.0127.47

Server storage [IO: ▲0.02MB] [DB: ▲0.67MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for CSV Custom Content Importer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲4815.91 ▲0.408.94 ▲1.0748.59 ▼0.64
Dashboard /wp-admin2,935 ▲855.98 ▲0.07137.97 ▲1.84100.84 ▼11.54
Posts /wp-admin/edit.php2,711 ▲82.70 ▲0.0163.05 ▼1.2895.24 ▲2.45
Add New Post /wp-admin/post-new.php1,484 ▼16718.28 ▲1.11349.77 ▼13.00105.57 ▼9.17
Media Library /wp-admin/upload.php1,777 ▲55.03 ▲0.03148.23 ▼6.92117.83 ▲1.32
CSV Custom Content Importer /wp-admin/tools.php?page=csv-custom-content-importer1,0922.0857.3875.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.67MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=csv-custom-content-importer
    • > Warning in wp-content/plugins/csv-custom-content-importer/templates/upload_form.php+21
    count(): Parameter must be an array or an object that implements Countable

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/csv-custom-content-importer/templates/components/footer.php
    • > /wp-content/plugins/csv-custom-content-importer/templates/completed_screen.php
    • > /wp-content/plugins/csv-custom-content-importer/templates/tool_maintenance_empty.php
    • > /wp-content/plugins/csv-custom-content-importer/templates/components/header.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/csv-custom-content-importer/templates/upload_form.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CcciCustomTypeHandler' not found in wp-content/plugins/csv-custom-content-importer/src/CcciPodHandler.php:9
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/csv-custom-content-importer/templates/components/errors.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-custom-content-importer/templates/tool_maintenance.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csv-custom-content-importer/csv-custom-content-importer.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/csv-custom-content-importer/templates/matching_form.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: pod, csv, import, pods, custom post type

csv-custom-content-importer/csv-custom-content-importer.php Passed 13 tests

The entry point to "CSV Custom Content Importer" version 0.5 is a PHP file that has certain tags in its header comment area
38 characters long description:
Imports data from a CSV file to Pods..

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected445 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP13103207445

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.00
▷ Minimum class complexity4.00
▷ Maximum class complexity30.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods31
▷ Static methods39.68%
▷ Public methods2683.87%
▷ Protected methods516.13%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin