68% inkgo-product-personalizer-for-woocommerce

Code Review | InkGo Product Personalizer for WooCommerce

WordPress plugin InkGo Product Personalizer for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: inkgo-product-per...
  • Plugin version: 2.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Dec 23, 2019
  • Latest release: Oct 31, 2021
  • Number of updates: 21
  • Update frequency: every 32.3 days
  • Top authors: dangcv (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /7,553 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.53MB] [CPU: ▼45.49ms] Passed 4 tests

A check of server-side resources used by InkGo Product Personalizer for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2027.61 ▼14.73
Dashboard /wp-admin2.42 ▼0.8911.03 ▼36.51
Posts /wp-admin/edit.php2.42 ▼0.9411.47 ▼31.38
Add New Post /wp-admin/post-new.php2.42 ▼3.479.74 ▼87.42
Media Library /wp-admin/upload.php2.42 ▼0.819.45 ▼26.63
InkGo Connect /wp-admin/admin.php?page=inkgo_settings2.4210.63
Products & Orders /wp-admin/admin.php?page=inkgo2.4211.35

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

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

Browser metrics Passed 4 tests

InkGo Product Personalizer for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,491 ▼27014.10 ▼0.190.52 ▼1.0518.48 ▼20.63
Dashboard /wp-admin2,235 ▲555.56 ▼0.1181.64 ▼5.2367.41 ▲26.37
Posts /wp-admin/edit.php2,143 ▲432.01 ▲0.0137.75 ▲3.1833.15 ▼2.20
Add New Post /wp-admin/post-new.php45 ▼1,4830.42 ▼22.720.07 ▼666.249.03 ▼49.61
Media Library /wp-admin/upload.php1,440 ▲434.13 ▼0.1095.31 ▼3.8786.09 ▲42.13
InkGo Connect /wp-admin/admin.php?page=inkgo_settings7201.516.1220.20
Products & Orders /wp-admin/admin.php?page=inkgo7942.0325.4930.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/woocommerce/init.php+21
    Use of undefined constant flase - assumed 'flase' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=inkgo
    • > Warning in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/woocommerce/init.php+21
    Use of undefined constant flase - assumed 'flase' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=inkgo_settings
    • > Error in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/admin/class-inkgo-client.php+22
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/admin/class-inkgo-client.php:22
    Stack trace:
    #0 wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/admin/class-inkgo-common.php(55): InkGo_Client->__construct()
    #1 wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/admin/functions.php(113): InkGo_Common::ping_to_inkgo()
    #2 wp-includes/class-wp-hook.php(310): inkgo_settings()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=inkgo
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'inkgo' not found or invalid function name
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=inkgo
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 50% 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 fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/admin/html/settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inkgo.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/admin/html/settings.php:28
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/admin/html/settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Controller' not found in wp-content/plugins/inkgo-product-personalizer-for-woocommerce/inc/class-inkgo-rest-api-controller.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

inkgo-product-personalizer-for-woocommerce/inkgo.php 85% from 13 tests

The principal PHP file in "InkGo Product Personalizer for WooCommerce" v. 2.1.8 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("inkgo-product-personalizer-for-woocommerce.php" instead of "inkgo.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,184 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP162472591,910
CSS232105
JavaScript35190
SVG20179

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity6.20
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods421.05%
▷ Public methods1894.74%
▷ Protected methods15.26%
▷ Private methods00.00%
Functions50
▷ Named functions4998.00%
▷ Anonymous functions12.00%
Constants12
▷ Global constants12100.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
No PNG images were found in this plugin