84% channelengine-woocommerce

Code Review | WooCommerce ChannelEngine

WordPress plugin WooCommerce ChannelEngine scored84%from 54 tests.

About plugin

  • Plugin page: channelengine-woo...
  • Plugin version: 2.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3.2
  • WordPress version: 6.3.1
  • First release: Nov 1, 2016
  • Latest release: Aug 7, 2020
  • Number of updates: 32
  • Update frequency: every 42.9 days
  • Top authors: channelengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.27MB] [CPU: ▼1.64ms] Passed 4 tests

An overview of server-side resources used by WooCommerce ChannelEngine
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3038.37 ▲1.23
Dashboard /wp-admin3.63 ▲0.2852.10 ▼9.16
Posts /wp-admin/edit.php3.68 ▲0.3247.29 ▲1.20
Add New Post /wp-admin/post-new.php6.15 ▲0.2683.34 ▲0.19
Media Library /wp-admin/upload.php3.49 ▲0.2633.73 ▲1.41

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 304 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce ChannelEngine
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.181.91 ▲0.2838.96 ▼7.39
Dashboard /wp-admin2,192 ▲155.56 ▲0.0183.79 ▼19.2038.44 ▼5.07
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0034.79 ▲0.2532.01 ▼4.27
Add New Post /wp-admin/post-new.php1,535 ▲718.17 ▼5.02608.55 ▼72.4166.79 ▲6.86
Media Library /wp-admin/upload.php1,400 ▼34.16 ▼0.0394.48 ▼6.6144.43 ▼1.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 184× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/channelengine-woocommerce/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/channelengine-woocommerce/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/channelengine-woocommerce/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\Test\\TestCase' not found in wp-content/plugins/channelengine-woocommerce/vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/channelengine-woocommerce/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'ChannelEngine\\Merchant\\ApiClient\\Model\\ModelInterface' not found in wp-content/plugins/channelengine-woocommerce/vendor/channelengine/merchant-api-client-php/lib/Model/MerchantProductRequest.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'ChannelEngine\\Merchant\\ApiClient\\Model\\ModelInterface' not found in wp-content/plugins/channelengine-woocommerce/vendor/channelengine/merchant-api-client-php/lib/Model/MerchantProductResponse.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/channelengine-woocommerce/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/channelengine-woocommerce/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'ChannelEngine\\Merchant\\ApiClient\\Model\\ModelInterface' not found in wp-content/plugins/channelengine-woocommerce/vendor/channelengine/merchant-api-client-php/lib/Model/MerchantReturnLineResponse.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

channelengine-woocommerce/woocommerce-channel-engine.php 92% from 13 tests

The entry point to "WooCommerce ChannelEngine" version 2.4.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("channelengine-woocommerce.php" instead of "woocommerce-channel-engine.php")

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
Everything looks great! No dangerous files found in this plugin26,661 lines of code in 285 files:
LanguageFilesBlank linesComment linesLines of code
PHP2514,59813,91122,253
Markdown1498203,427
JSON800717
JavaScript45288
CSS18056
XML23043
YAML37037
Bourne Shell113831
make1409

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.81
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces13
Interfaces15
Traits2
Classes220
▷ Abstract classes20.91%
▷ Concrete classes21899.09%
▷ Final classes73.21%
Methods1,789
▷ Static methods21011.74%
▷ Public methods1,60189.49%
▷ Protected methods603.35%
▷ Private methods1287.15%
Functions193
▷ Named functions5930.57%
▷ Anonymous functions13469.43%
Constants154
▷ Global constants00.00%
▷ Class constants154100.00%
▷ Public constants154100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.24MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/channel-engine-logo.png11.00KB6.09KB▼ 44.63%
admin/images/wrong_cross.png66.85KB2.73KB▼ 95.92%
admin/images/returned_order.png31.03KB1.01KB▼ 96.75%
admin/images/checkmark.png66.85KB2.53KB▼ 96.21%
admin/images/incomplete_cross.png66.85KB2.73KB▼ 95.92%