73% linkgreen-product-import

Code Review | LinkGreen Product Import

WordPress plugin LinkGreen Product Import scored73%from 54 tests.

About plugin

  • Plugin page: linkgreen-product...
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2019
  • Latest release: Sep 25, 2019
  • Number of updates: 14
  • Update frequency: every 1.4 days
  • Top authors: linkgreen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /574 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.61MB] [CPU: ▲2.94ms] Passed 4 tests

Server-side resources used by LinkGreen Product Import
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6049.17 ▲2.63
Dashboard /wp-admin3.93 ▲0.6253.42 ▼4.68
Posts /wp-admin/edit.php3.98 ▲0.6260.27 ▲10.46
Add New Post /wp-admin/post-new.php6.55 ▲0.66108.08 ▲9.29
Media Library /wp-admin/upload.php3.85 ▲0.6242.69 ▲4.52
LinkGreen Product Import Admin /wp-admin/tools.php?page=linkgreen_product_import_options3.8040.93

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
linkgreen_product_import_debug_options
linkgreen_product_import_setup_options
linkgreen_product_import_input_examples
db_upgraded

Browser metrics Passed 4 tests

LinkGreen Product Import: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.37 ▼0.987.63 ▲5.8540.44 ▼3.14
Dashboard /wp-admin2,203 ▲295.59 ▲0.0195.50 ▼8.8038.52 ▼11.73
Posts /wp-admin/edit.php2,108 ▲82.00 ▼0.0139.94 ▲1.3436.34 ▼0.39
Add New Post /wp-admin/post-new.php1,538 ▲1023.12 ▲0.09626.26 ▼42.2345.14 ▼8.71
Media Library /wp-admin/upload.php1,402 ▲24.15 ▼0.0399.37 ▼9.5245.95 ▲0.78
LinkGreen Product Import Admin /wp-admin/tools.php?page=linkgreen_product_import_options8791.9923.5530.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • linkgreen_product_import_input_examples
    • db_upgraded
    • widget_theysaidso_widget
    • linkgreen_product_import_setup_options
    • theysaidso_admin_options
    • linkgreen_product_import_debug_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=linkgreen_product_import_options
    • > Notice in wp-content/plugins/linkgreen-product-import/admin/class-plugin-settings.php+519
    Undefined index: api_token
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=linkgreen_product_import_options
    • > Notice in wp-content/plugins/linkgreen-product-import/admin/class-plugin-settings.php+563
    Undefined index: schedule_frequency

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/linkgreen-product-import/admin/partials/linkgreen-product-import-admin-display.php
    • > /wp-content/plugins/linkgreen-product-import/public/partials/linkgreen-product-import-public-display.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/linkgreen-product-import/admin/page-template-linkgreen-retail-locations.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/linkgreen-product-import/includes/task-product-import.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/linkgreen-product-import/includes/wp-background-processing/wp-background-processing.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/linkgreen-product-import/includes/rest-controller-products.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/linkgreen-product-import/includes/helpers.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/linkgreen-product-import/includes/wp-background-processing/classes/wp-background-process.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/linkgreen-product-import/includes/task-product-delete.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/linkgreen-product-import/includes/task-product-callback.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/linkgreen-product-import/includes/task-product-api.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: wholesale, linkgreen, link green, woocommerce, api

linkgreen-product-import/linkgreen-product-import.php Passed 13 tests

"LinkGreen Product Import" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
118 characters long description:
Use your LinkGreen.io catalogs to feed WooCommerce with products including pictures, attributes & even store locations

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,050 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP281,0821,4882,542
JavaScript37379291
Markdown1540104
CSS3181395
JSON10018

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.24
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes29.52%
▷ Concrete classes1990.48%
▷ Final classes00.00%
Methods186
▷ Static methods158.06%
▷ Public methods10958.60%
▷ Protected methods3116.67%
▷ Private methods4624.73%
Functions14
▷ Named functions1178.57%
▷ Anonymous functions321.43%
Constants20
▷ Global constants525.00%
▷ Class constants1575.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin