10% e-strix-allegro-symc

Code Review | Allegro Auction Grabber

WordPress plugin Allegro Auction Grabber scored 10% from 54 tests.

About plugin

  • Plugin page: e-strix-allegro-symc
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Nov 10, 2017
  • Latest release: Jan 21, 2020
  • Number of updates: 25
  • Update frequency: every 32.1 days
  • Top authors: kamilmucik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,267 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.99ms] Passed 4 tests

Analyzing server-side resources used by Allegro Auction Grabber
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.22 ▲3.70
Dashboard /wp-admin3.40 ▲0.1075.82 ▲30.78
Posts /wp-admin/edit.php3.38 ▲0.0251.53 ▲5.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.28 ▼34.77
Media Library /wp-admin/upload.php3.25 ▲0.0247.79 ▲13.29
Settings /wp-admin/admin.php?page=srtx_allegro_symc_settings3.1930.29
Auctions /wp-admin/admin.php?page=srtx_allegro_symc_auctions3.1935.31

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: 3 new tables, 9 new options
New tables
wp_strx_allegro_symc_auction_image
wp_strx_allegro_symc_auction
wp_strx_allegro_symc_settings
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
e_strix_allegro_symc_db_version
can_compress_scripts
widget_theysaidso_widget
widget_srtx_allegro_symc_widget
allegro_sync_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Allegro Auction Grabber
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10613.24 ▼1.142.06 ▲0.2742.18 ▲1.82
Dashboard /wp-admin2,227 ▲364.83 ▼0.04119.90 ▼0.2544.05 ▼3.04
Posts /wp-admin/edit.php2,116 ▲242.01 ▼0.0445.09 ▼9.2035.07 ▼16.54
Add New Post /wp-admin/post-new.php1,560 ▲3823.56 ▲0.31724.04 ▼107.3262.10 ▲0.48
Media Library /wp-admin/upload.php1,412 ▲244.22 ▲0.03170.13 ▲49.1066.94 ▲11.37
Settings /wp-admin/admin.php?page=srtx_allegro_symc_settings8822.0225.0628.96
Auctions /wp-admin/admin.php?page=srtx_allegro_symc_auctions9212.0532.0735.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • The uninstall procedure has failed, leaving 9 options in the database
    • e_strix_allegro_symc_db_version
    • widget_srtx_allegro_symc_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • allegro_sync_db_version
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=srtx_allegro_symc_settings
    • > Notice in wp-content/plugins/e-strix-allegro-symc/e-strix-allegro-symc.php+146
    Undefined variable: html
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=srtx_allegro_symc_auctions
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=srtx_allegro_symc_auctions
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
    • > GET request to /wp-admin/admin.php?page=srtx_allegro_symc_auctions
    • > Notice in wp-content/plugins/e-strix-allegro-symc/e-strix-allegro-symc.php+299
    Undefined variable: title

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
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/e-strix-allegro-symc/model/widget/e_strix_allegro_symc_widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/e-strix-allegro-symc/model/tables/allegro_auction.php:3
    • > 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/e-strix-allegro-symc/e-strix-allegro-symc.php on line 18
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/e-strix-allegro-symc/e-strix-allegro-symc.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/e-strix-allegro-symc/model/cron/update_allegro_token.php:28
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/e-strix-allegro-symc/e-strix-allegro-symc.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/e-strix-allegro-symc/model/tables/allegro_auction.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/e-strix-allegro-symc/model/shortcode/e_strix_allegro_symc_shortcode.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: widget, synchronizacja, allegro, woocommerce, wordpress...

e-strix-allegro-symc/e-strix-allegro-symc.php 85% from 13 tests

The main PHP script in "Allegro Auction Grabber" version 2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("//")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/")

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
No dangerous file extensions were detected1,166 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP142781101,077
PO File135089

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.70
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods79
▷ Static methods00.00%
▷ Public methods7392.41%
▷ Protected methods00.00%
▷ Private methods67.59%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin