84% conversion-tracking-for-woocommerce-and-google-ads

Code Review | Conversion Tracking for WooCommerce and Google Ads

WordPress plugin Conversion Tracking for WooCommerce and Google Ads scored84%from 54 tests.

About plugin

  • Plugin page: conversion-tracki...
  • Plugin version: 1.00
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5
  • WordPress version: 6.3.1
  • First release: Nov 5, 2020
  • Latest release: Nov 5, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /508 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.66ms] Passed 4 tests

Analyzing server-side resources used by Conversion Tracking for WooCommerce and Google Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0433.79 ▼6.99
Dashboard /wp-admin3.46 ▲0.1643.87 ▼6.94
Posts /wp-admin/edit.php3.57 ▲0.2248.20 ▲4.25
Add New Post /wp-admin/post-new.php6.04 ▲0.1591.33 ▲0.02
Media Library /wp-admin/upload.php3.38 ▲0.1537.62 ▲3.26
Options /wp-admin/admin.php?page=daextctwga-options3.3631.73
Help /wp-admin/admin.php?page=daextctwga-help3.3542.14

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 87 new files
Database: no new tables, 16 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
daextctwga_excluded_user_capability
daextctwga_order_value
daextctwga_conversion_id
daextctwga_conversion_label
daextctwga_excluded_user_ip
daextctwga_required_cookie_value
daextctwga_require_cookie
...

Browser metrics Passed 4 tests

An overview of browser requirements for Conversion Tracking for WooCommerce and Google Ads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲7914.48 ▲0.191.66 ▼0.3739.37 ▼4.24
Dashboard /wp-admin2,253 ▲745.91 ▲0.05112.81 ▼7.6138.27 ▼12.36
Posts /wp-admin/edit.php2,139 ▲502.01 ▼0.0244.79 ▲7.9035.48 ▼0.90
Add New Post /wp-admin/post-new.php1,550 ▲1423.27 ▲0.18662.83 ▲31.0266.33 ▲20.08
Media Library /wp-admin/upload.php1,432 ▲444.23 ▼0.03103.21 ▲3.7242.76 ▼0.85
Options /wp-admin/admin.php?page=daextctwga-options1,0282.5546.2934.48
Help /wp-admin/admin.php?page=daextctwga-help8432.0329.4924.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/conversion-tracking-for-woocommerce-and-google-ads/admin/view/help.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/conversion-tracking-for-woocommerce-and-google-ads/admin/view/options.php:3

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 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

conversion-tracking-for-woocommerce-and-google-ads/init.php 92% from 13 tests

"Conversion Tracking for WooCommerce and Google Ads" version 1.00's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("conversion-tracking-for-woocommerce-and-google-ads.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected11,567 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript672,5517609,517
CSS7222231,286
PHP7291168634
PO File14141113
Markdown14017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity12.00
▷ Maximum class complexity18.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods42
▷ Static methods511.90%
▷ Public methods3890.48%
▷ Protected methods00.00%
▷ Private methods49.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/help-f7f7f7.png15.86KB0.59KB▼ 96.25%
admin/assets/img/help-fdfdfd.png15.52KB0.53KB▼ 96.60%