84% product-reviews-import-export-for-woocommerce

Code Review | Product Reviews Import Export for WooCommerce

WordPress plugin Product Reviews Import Export for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: product-reviews-i...
  • Plugin version: 1.4.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2016
  • Latest release: Dec 8, 2022
  • Number of updates: 76
  • Update frequency: every 29.8 days
  • Top authors: webtoffee (56.58%)hikeforce (22.37%)xadapter (13.16%)mujeebur (11.84%)

Code review

54 tests

User reviews

39 reviews

Install metrics

3,000+ active /81,785 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.01MB] [CPU: ▼15.04ms] Passed 4 tests

Server-side resources used by Product Reviews Import Export for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.56 ▼0.18
Dashboard /wp-admin3.31 ▼0.0447.78 ▼17.28
Posts /wp-admin/edit.php3.36 ▲0.0046.73 ▼5.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.75 ▼35.74
Media Library /wp-admin/upload.php3.23 ▲0.0035.41 ▼2.03

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 7 new options
New WordPress options
wtpripre_start_date
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Reviews Import Export for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.38 ▼0.001.84 ▼0.0342.99 ▲0.76
Dashboard /wp-admin2,189 ▲125.60 ▼0.1186.36 ▼3.8041.68 ▼2.67
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0238.33 ▼1.0433.67 ▼3.40
Add New Post /wp-admin/post-new.php1,545 ▲1323.21 ▲0.08627.34 ▼59.0559.17 ▲6.28
Media Library /wp-admin/upload.php1,394 ▼04.18 ▼0.02101.32 ▲1.8142.65 ▼1.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • wtpripre_start_date
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-reviews-import-export-for-woocommerce/includes/views/export/html-wf-export-product-reviews.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-reviews-import-export-for-woocommerce/includes/views/import/html-wf-import-product-reviews.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/product-reviews-import-export-for-woocommerce/includes/views/html-wf-admin-screen.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/product-reviews-import-export-for-woocommerce/includes/importer/views/html-wf-import-options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-reviews-import-export-for-woocommerce/includes/views/html-wf-getting-started.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-reviews-import-export-for-woocommerce/includes/views/import/html-wf-import-greeting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/product-reviews-import-export-for-woocommerce/includes/importer/views/html-wf-import-greeting.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: You can look at the official readme.txt

product-reviews-import-export-for-woocommerce/product-reviews-import-export.php 92% from 13 tests

"Product Reviews Import Export for WooCommerce" version 1.4.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("product-reviews-import-export-for-woocommerce.php" instead of "product-reviews-import-export.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,953 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP234083191,784
CSS26345849
PO File18285257
SVG50063

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity32.38
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity4.98
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods63
▷ Static methods1117.46%
▷ Public methods5993.65%
▷ Protected methods11.59%
▷ Private methods34.76%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.22MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Import-Export-for-WooCommerce-Product-Image.png192.24KB74.00KB▼ 61.51%
images/csv.png1.75KB1.75KB0.11%
images/storefrog.png8.44KB4.63KB▼ 45.21%
images/wf-import.png1.62KB1.39KB▼ 14.10%
images/wf-success.png3.24KB0.59KB▼ 81.90%