10% dtdc-il

Code Review | DTDC IL Plugin

WordPress plugin DTDC IL Plugin scored10%from 54 tests.

About plugin

  • Plugin page: dtdc-il
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2021
  • Latest release: Apr 11, 2022
  • Number of updates: 26
  • Update frequency: every 7.7 days
  • Top authors: shipsyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /776 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had 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: ▼5.26ms] Passed 4 tests

This is a short check of server-side resources used by DTDC IL Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.54 ▼5.40
Dashboard /wp-admin3.34 ▲0.0345.39 ▼8.12
Posts /wp-admin/edit.php3.39 ▲0.0345.85 ▼2.08
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.20 ▼5.42
Media Library /wp-admin/upload.php3.26 ▲0.0334.85 ▲1.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 102 new files
Database: 1 new table, 6 new options
New tables
wp_sync_track_order
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for DTDC IL Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.291.53 ▼0.1238.54 ▼8.76
Dashboard /wp-admin2,200 ▲94.87 ▲0.0199.69 ▼16.6241.63 ▼5.25
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0039.90 ▲0.2234.61 ▲0.40
Add New Post /wp-admin/post-new.php1,542 ▲1418.46 ▼4.64598.23 ▼106.0351.49 ▼9.50
Media Library /wp-admin/upload.php1,382 ▼94.19 ▼0.02100.26 ▼3.3439.23 ▼3.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > 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.)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dtdc-il/trunk/admin/partials/dtdc-econnect-admin-display.php
    • > /wp-content/plugins/dtdc-il/public/partials/dtdc-econnect-public-display.php
    • > /wp-content/plugins/dtdc-il/trunk/public/partials/dtdc-econnect-public-display.php
    • > /wp-content/plugins/dtdc-il/admin/partials/dtdc-econnect-admin-display.php
  • 76× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant DTDC_ECONNECT_PATH - assumed 'DTDC_ECONNECT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dtdc-il/admin/partials/ec-manage.php on line 3
    • > PHP Warning
      Use of undefined constant DTDC_ECONNECT_PATH - assumed 'DTDC_ECONNECT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dtdc-il/trunk/admin/partials/ec-sync-form.php on line 3
    • > PHP Warning
      include_once(DTDC_ECONNECT_PATHadmin/helper/helper.php): failed to open stream: No such file or directory in wp-content/plugins/dtdc-il/admin/apis/js-shipping-address-helper-api.php on line 2
    • > PHP Warning
      Use of undefined constant DTDC_ECONNECT_PATH - assumed 'DTDC_ECONNECT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dtdc-il/admin/partials/ec-vseries.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'DTDC_ECONNECT_PATHadmin/helper/helper.php' (include_path='.:/usr/share/php') in wp-content/plugins/dtdc-il/trunk/admin/partials/ec-setup.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shipsySanitizeArray() in wp-content/plugins/dtdc-il/admin/apis/js-softdata-upload-api.php:4
    • > PHP Warning
      Use of undefined constant DTDC_ECONNECT_PATH - assumed 'DTDC_ECONNECT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dtdc-il/admin/apis/js-addresses-helper-api.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dtdcGetAddresses() in wp-content/plugins/dtdc-il/trunk/admin/apis/js-addresses-helper-api.php:5
    • > PHP Fatal error
      require(): Failed opening required 'DTDC_ECONNECT_PATHconfig/settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/dtdc-il/trunk/admin/apis/js-endpoint-helper-api.php on line 3
    • > PHP Warning
      require(DTDC_ECONNECT_PATHconfig/settings.php): failed to open stream: No such file or directory in wp-content/plugins/dtdc-il/admin/apis/js-endpoint-helper-api.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: ecommerce, shipsy, dtdc

dtdc-il/dtdc-econnect.php 92% from 13 tests

The main file in "DTDC IL Plugin" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dtdc-il.php" instead of "dtdc-econnect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected5,039 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP283888382,565
JavaScript73053141,378
CSS81434851
JSON100245

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.44
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods126
▷ Static methods43.17%
▷ Public methods10885.71%
▷ Protected methods00.00%
▷ Private methods1814.29%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There are no PNG files in this plugin