68% dtdc-econnect

Code Review | DTDC Econnect Plugin

WordPress plugin DTDC Econnect Plugin scored68%from 54 tests.

About plugin

  • Plugin page: dtdc-econnect
  • Plugin version: 1.0.17
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2021
  • Latest release: Jun 8, 2023
  • Number of updates: 44
  • Update frequency: every 16.7 days
  • Top authors: shipsyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,917 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by DTDC Econnect Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.84 ▲0.65
Dashboard /wp-admin3.34 ▲0.0348.82 ▲1.75
Posts /wp-admin/edit.php3.39 ▲0.0349.62 ▲1.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.81 ▼21.67
Media Library /wp-admin/upload.php3.26 ▲0.0335.12 ▲1.13

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 62 new files
Database: 1 new table, 6 new options
New tables
wp_sync_track_order
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for DTDC Econnect Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.421.88 ▲0.2151.79 ▲10.28
Dashboard /wp-admin2,206 ▲154.86 ▼0.02105.43 ▲2.7140.32 ▼8.39
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0139.57 ▼2.5333.93 ▼5.06
Add New Post /wp-admin/post-new.php1,514 ▼517.54 ▼5.78680.66 ▲22.7257.93 ▼0.14
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0094.53 ▼2.7442.74 ▲1.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_sync_track_order
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dtdc-econnect/public/partials/shipsy-econnect-public-display.php
    • > /wp-content/plugins/dtdc-econnect/admin/partials/shipsy-econnect-admin-display.php
  • 69× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(SHIPSY_ECONNECT_PATHadmin/helper/helper.php): failed to open stream: No such file or directory in wp-content/plugins/dtdc-econnect/admin/apis/shipsy-addresses-helper-api.php on line 14
    • > PHP Warning
      Use of undefined constant SHIPSY_ECONNECT_PATH - assumed 'SHIPSY_ECONNECT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dtdc-econnect/templates/myaccount/view-order.php on line 16
    • > PHP Fatal error
      require_once(): Failed opening required 'SHIPSY_ECONNECT_PATHadmin/crons/decorators/class-job-decorator.php' (include_path='.:/usr/share/php') in wp-content/plugins/dtdc-econnect/admin/crons/decorators/class-auth-check-job-decorator.php on line 16
    • > PHP Warning
      require_once(SHIPSY_ECONNECT_PATHadmin/helper/helper.php): failed to open stream: No such file or directory in wp-content/plugins/dtdc-econnect/admin/apis/shipsy-shipping-label-download-api.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'SHIPSY_ECONNECT_PATHadmin/crons/jobs/interface-job.php' (include_path='.:/usr/share/php') in wp-content/plugins/dtdc-econnect/admin/crons/decorators/class-job-decorator.php on line 16
    • > PHP Warning
      require_once(SHIPSY_ECONNECT_PATHutils/request/shipsy-request-handler.php): failed to open stream: No such file or directory in wp-content/plugins/dtdc-econnect/admin/helper/helper.php on line 19
    • > PHP Warning
      require_once(SHIPSY_ECONNECT_PATHutils/request/request/interface-request.php): failed to open stream: No such file or directory in wp-content/plugins/dtdc-econnect/utils/request/request/class-request.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'SHIPSY_ECONNECT_PATHutils/request/shipsy-request-handler.php' (include_path='.:/usr/share/php') in wp-content/plugins/dtdc-econnect/admin/helper/helper.php on line 19
    • > PHP Fatal error
      require(): Failed opening required 'SHIPSY_ECONNECT_PATHconfig/settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/dtdc-econnect/templates/myaccount/view-order.php on line 16
    • > PHP Fatal error
      require(): Failed opening required 'SHIPSY_ECONNECT_PATHconfig/settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/dtdc-econnect/admin/apis/shipsy-endpoint-helper-api.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: ecommerce, dtdc, shipsy

dtdc-econnect/shipsy-econnect.php 77% from 13 tests

The main file in "DTDC Econnect Plugin" v. 1.0.17 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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 192 characters long)
  • 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
  • Main file name: Name the main plugin file the same as the plugin slug ("dtdc-econnect.php" instead of "shipsy-econnect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,363 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP395741,5943,867
JavaScript73063141,385
CSS81434852
JSON100245
Bourne Shell19714

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.88
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces8
Interfaces2
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods82
▷ Static methods00.00%
▷ Public methods7186.59%
▷ Protected methods00.00%
▷ Private methods1113.41%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin