57% product-puller

Code Review | Product Puller

WordPress plugin Product Puller scored57%from 54 tests.

About plugin

  • Plugin page: product-puller
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2021
  • Latest release: Sep 26, 2021
  • Number of updates: 7
  • Update frequency: every 6.7 days
  • Top authors: kyazici (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /620 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.99ms] Passed 4 tests

This is a short check of server-side resources used by Product Puller
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.427.46 ▼35.89
Dashboard /wp-admin2.06 ▼1.246.33 ▼42.24
Posts /wp-admin/edit.php2.06 ▼1.295.73 ▼47.28
Add New Post /wp-admin/post-new.php2.06 ▼3.826.43 ▼86.55
Media Library /wp-admin/upload.php2.06 ▼1.165.45 ▼29.64
Product Comparison /wp-admin/admin.php?page=product_puller_comparison2.065.77
Language Settings /wp-admin/admin.php?page=product_puller_lang2.068.60
Amazon Woo Puller /wp-admin/admin.php?page=product_puller_woo2.065.23
Products /wp-admin/admin.php?page=pull_products2.066.60
Product Puller /wp-admin/admin.php?page=product_puller2.064.86

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 68 new files
Database: 1 new table, 7 new options
New tables
wp_product_puller
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
product_puller_plugin_version
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Product Puller
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,438 ▲69218.23 ▲3.6716.57 ▲14.8842.51 ▼0.00
Dashboard /wp-admin2,310 ▲1226.13 ▲1.25111.07 ▲2.1068.27 ▲24.67
Posts /wp-admin/edit.php2,366 ▲2743.68 ▲1.6952.20 ▲9.2777.79 ▲41.85
Add New Post /wp-admin/post-new.php1,615 ▲8723.20 ▲0.05635.31 ▼19.50190.40 ▲138.08
Media Library /wp-admin/upload.php1,648 ▲2575.60 ▲1.31117.99 ▲18.0193.99 ▲49.41
Product Comparison /wp-admin/admin.php?page=product_puller_comparison2,38117.44543.49107.14
Language Settings /wp-admin/admin.php?page=product_puller_lang1,2363.4742.1371.18
Amazon Woo Puller /wp-admin/admin.php?page=product_puller_woo1,61710.47272.1680.36
Products /wp-admin/admin.php?page=pull_products1,2113.4940.1758.50
Product Puller /wp-admin/admin.php?page=product_puller2,54216.71535.6672.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the editor handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the editor handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the quicktags handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the buttons handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wplink handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-autocomplete handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the media-upload handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the editor-buttons handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=pull_products
    • > Notice in wp-content/plugins/product-puller/includes/view/includes/menu/products.php+9
    Undefined index: add

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/product-puller/includes/view/includes/menu/products.add.php
    • > /wp-content/plugins/product-puller/includes/view/includes/menu/dashboard.activation.php
  • 89× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/product-puller/includes/controller/includes/panel/comparisons.php on line 3
    • > PHP Notice
      Undefined variable: comp in wp-content/plugins/product-puller/includes/view/includes/menu/comparison.edit.amazon.php on line 6
    • > PHP Warning
      include(PRDP_ROOTincludes/model/includes/js.php): failed to open stream: No such file or directory in wp-content/plugins/product-puller/includes/model/model.php on line 7
    • > PHP Warning
      Use of undefined constant PRDP_VIEW_INC - assumed 'PRDP_VIEW_INC' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-puller/includes/view/view.php on line 5
    • > PHP Notice
      Undefined variable: model in wp-content/plugins/product-puller/includes/view/includes/menu/woo.fail.php on line 7
    • > PHP Warning
      include(PRDP_ROOTincludes/model/includes/ajax.php): failed to open stream: No such file or directory in wp-content/plugins/product-puller/includes/model/model.php on line 8
    • > PHP Warning
      include(PRDP_VIEW_INCmenu/products.php): failed to open stream: No such file or directory in wp-content/plugins/product-puller/includes/view/view.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'PRDP_CNTRLR_INCpanel/products.php' (include_path='.:/usr/share/php') in wp-content/plugins/product-puller/includes/controller/includes/panel.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'PRDP_ROOTincludes/model/includes/models.php' (include_path='.:/usr/share/php') in wp-content/plugins/product-puller/includes/model/model.php on line 10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-puller/includes/view/includes/shortcodes/bulk.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=product_puller
    • > Javascript (severe) in unknown
    /wp-content/plugins/product-puller/includes/view/js/search.js?ver=6.3.1 108:6 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

product-puller/product-puller.php Passed 13 tests

The main PHP file in "Product Puller" ver. 1.5.1 adds more information about the plugin and also serves as the entry point for this plugin
113 characters long description:
This plugin allows you to automatically import the product information from Amazon and add show it in everywhere.

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
Success! There were no dangerous files found in this plugin4,356 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP414333262,802
CSS31235853
JavaScript127811701

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity49.40
▷ Minimum class complexity18.00
▷ Maximum class complexity102.00
Average method complexity4.03
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods80
▷ Static methods00.00%
▷ Public methods80100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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.15MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/view/assets/details-bg.png0.93KB0.09KB▼ 89.84%
includes/view/assets/amazon2.png11.88KB5.74KB▼ 51.73%
includes/view/assets/icon.png1.86KB1.16KB▼ 37.49%
includes/view/assets/amazon3.png12.64KB5.83KB▼ 53.86%
includes/view/assets/amazon.png7.72KB2.34KB▼ 69.62%