84% csv-wc-product-import-export

Code Review | CSV Product Import Export for WooCommerce

WordPress plugin CSV Product Import Export for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: csv-wc-product-im...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Jun 27, 2022
  • Latest release: Jun 27, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: cmssoft (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 3,297 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by CSV Product Import Export for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.87 ▲3.21
Dashboard /wp-admin3.31 ▲0.0150.18 ▲6.83
Posts /wp-admin/edit.php3.36 ▲0.0045.87 ▼3.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.44 ▼4.97
Media Library /wp-admin/upload.php3.23 ▲0.0033.56 ▼1.90

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for CSV Product Import Export for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.40 ▼0.411.84 ▼0.1047.85 ▼0.89
Dashboard /wp-admin2,203 ▲155.84 ▲0.7997.04 ▼20.6739.18 ▼7.43
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0136.10 ▼0.5036.91 ▲5.08
Add New Post /wp-admin/post-new.php1,534 ▼218.29 ▼4.77581.76 ▼75.7967.16 ▲11.15
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.0196.64 ▼9.6040.80 ▼2.69

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-wc-product-import-export/includes/importer/views/html-import-greeting.php:5
    • > PHP Notice
      Undefined variable: log_file in wp-content/plugins/csv-wc-product-import-export/includes/views/import/html-import-logs.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-wc-product-import-export/includes/importer/views/html-import-options.php:2
    • > PHP Notice
      Undefined variable: log_file in wp-content/plugins/csv-wc-product-import-export/includes/views/import/html-import-logs.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-wc-product-import-export/includes/views/html-admin-tabs.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-wc-product-import-export/includes/views/import/html-import-logs.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-wc-product-import-export/includes/views/import/html-import-products.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/csv-wc-product-import-export/includes/class-piecfw-dependencies.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-wc-product-import-export/includes/views/export/html-export-products.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-wc-product-import-export/includes/views/html-admin-tabs.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: csv product export, csv product import, csv product import logs, woocommerce, csv product import by cron

csv-wc-product-import-export/csv-wc-product-import-export.php Passed 13 tests

The entry point to "CSV Product Import Export for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
70 characters long description:
Manage your WooCommerce product data by import & export from CSV file.

Code Analysis 97% from 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
No dangerous file extensions were detected9,252 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP301,5771,0466,315
JavaScript53411312,843
CSS31094

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 173)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity106.58
▷ Minimum class complexity3.00
▷ Maximum class complexity237.00
Average method complexity11.30
▷ Minimum method complexity1.00
▷ Maximum method complexity173.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods123
▷ Static methods1310.57%
▷ Public methods11190.24%
▷ Protected methods129.76%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
11 PNG files occupy 0.34MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/clock.png18.50KB10.09KB▼ 45.44%
assets/images/log.png0.76KB0.80KB0.00%
assets/images/done.png0.76KB0.68KB▼ 10.44%
assets/screenshots/screenshot-4.png88.74KB22.41KB▼ 74.75%
assets/images/error.png0.79KB0.72KB▼ 8.67%