84% woocommerce-conversion-tracking

Code Review | WooCommerce Conversion Tracking

WordPress plugin WooCommerce Conversion Tracking scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-conve...
  • Plugin version: 2.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2014
  • Latest release: Sep 15, 2023
  • Number of updates: 40
  • Update frequency: every 86.5 days
  • Top authors: tareq1988 (82.5%)Hasinur Rahman (20%)

Code review

54 tests

User reviews

20 reviews

Install metrics

40,000+ active /603,999 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▲1.53ms] Passed 4 tests

Server-side resources used by WooCommerce Conversion Tracking
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5645.47 ▲6.96
Dashboard /wp-admin3.85 ▲0.5548.16 ▼3.38
Posts /wp-admin/edit.php3.90 ▲0.5452.13 ▲1.13
Add New Post /wp-admin/post-new.php6.45 ▲0.5695.39 ▲2.36
Media Library /wp-admin/upload.php3.77 ▲0.5438.77 ▲6.02
Conversion Tracking /wp-admin/admin.php?page=conversion-tracking3.7436.40

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 169 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
wcct_version
theysaidso_admin_options
widget_recent-posts
wcct_installed

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Conversion Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲11213.36 ▼1.021.86 ▲0.0851.14 ▲5.96
Dashboard /wp-admin2,254 ▲634.98 ▼0.91113.91 ▲9.6645.83 ▲4.61
Posts /wp-admin/edit.php2,150 ▲582.61 ▲0.6041.59 ▲0.8439.65 ▲3.99
Add New Post /wp-admin/post-new.php1,563 ▲4923.54 ▲5.90627.75 ▼72.0853.20 ▲2.71
Media Library /wp-admin/upload.php1,445 ▲604.45 ▲0.21101.02 ▼10.2946.61 ▼1.03
Conversion Tracking /wp-admin/admin.php?page=conversion-tracking1,4182.0730.9631.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • wcct_installed
    • theysaidso_admin_options
    • widget_recent-posts
    • wcct_version
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 112× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/woocommerce-conversion-tracking/includes/integration.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/woocommerce-conversion-tracking/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php:4

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 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
9 plugin tags: tracking, ecommerce, commerce, google, adwords...

woocommerce-conversion-tracking/conversion-tracking.php 85% from 13 tests

"WooCommerce Conversion Tracking" version 2.0.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-conversion-tracking.php" instead of "conversion-tracking.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.4" instead of "5.0.0")

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
Everything looks great! No dangerous files found in this plugin7,341 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
PHP1361,3302,2285,979
JSON300387
CSS1010371
Markdown1820255
YAML4373155
JavaScript319799
XML161195

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.11
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes124
▷ Abstract classes21.61%
▷ Concrete classes12298.39%
▷ Final classes00.00%
Methods330
▷ Static methods206.06%
▷ Public methods25176.06%
▷ Protected methods4112.42%
▷ Private methods3811.52%
Functions13
▷ Named functions538.46%
▷ Anonymous functions861.54%
Constants10
▷ Global constants660.00%
▷ Class constants440.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png7.23KB3.86KB▼ 46.68%
assets/images/getting_started.png1.54KB1.13KB▼ 26.65%
assets/images/twitter.png1.72KB0.90KB▼ 47.41%
assets/images/adwords.png1.74KB1.09KB▼ 37.39%
assets/images/bing_ads.png2.68KB1.81KB▼ 32.40%