83% pixel-manager-for-woocommerce

Code Review | Pixel Tag Manager for WooCommerce (PTM) - All-in-One Tracking Solution for Google Analytics 4, Google Ads, Facebook and More

WordPress plugin Pixel Tag Manager for WooCommerce (PTM) - All-in-One Tracking Solution for Google Analytics 4, Google Ads, Facebook and More scored83%from 54 tests.

About plugin

  • Plugin page: pixel-manager-for...
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 26, 2022
  • Latest release: Nov 25, 2023
  • Number of updates: 57
  • Update frequency: every 9.7 days
  • Top authors: growcommerce (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /9,655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▲5.20ms] Passed 4 tests

Analyzing server-side resources used by Pixel Tag Manager for WooCommerce (PTM) - All-in-One Tracking Solution for Google Analytics 4, Google Ads, Facebook and More
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6338.67 ▲5.89
Dashboard /wp-admin3.92 ▲0.6248.16 ▲4.17
Posts /wp-admin/edit.php3.98 ▲0.6255.83 ▲9.38
Add New Post /wp-admin/post-new.php6.51 ▲0.6292.77 ▲1.34
Media Library /wp-admin/upload.php3.85 ▲0.6239.82 ▲9.38
Support /wp-admin/admin.php?page=pixel-manager-support3.7534.08
Pixel Settings /wp-admin/admin.php?page=pixel-manager4.0638.97
Free Vs Pro /wp-admin/admin.php?page=pixel-manager-freevspro4.0235.94
Upgrade to Pro /wp-admin/admin.php?page=pixel-manager-upgrade-pro3.7535.10
Account /wp-admin/admin.php?page=pixel-manager-account3.7933.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Pixel Tag Manager for WooCommerce (PTM) - All-in-One Tracking Solution for Google Analytics 4, Google Ads, Facebook and More
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,002 ▲24014.38 ▼0.3228.06 ▲26.4926.68 ▼13.08
Dashboard /wp-admin2,258 ▲805.61 ▼0.0396.31 ▼17.6883.08 ▲38.07
Posts /wp-admin/edit.php2,170 ▲671.99 ▲0.0441.20 ▼1.2142.13 ▲6.74
Add New Post /wp-admin/post-new.php1,748 ▲21924.55 ▲1.68622.16 ▼17.7162.81 ▲0.16
Media Library /wp-admin/upload.php1,469 ▲694.30 ▲0.0699.50 ▲0.3491.91 ▲46.89
Support /wp-admin/admin.php?page=pixel-manager-support1,4995.20106.8780.43
Pixel Settings /wp-admin/admin.php?page=pixel-manager2,4581.7528.0273.55
Free Vs Pro /wp-admin/admin.php?page=pixel-manager-freevspro2,1701.7327.0371.06
Upgrade to Pro /wp-admin/admin.php?page=pixel-manager-upgrade-pro2,6644.9293.0771.49
Account /wp-admin/admin.php?page=pixel-manager-account1,1811.7327.8846.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • pmw_migration
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • pmw_admin_notices

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PMW_Helper' not found in wp-content/plugins/pixel-manager-for-woocommerce/admin/partials/common/class-pmw-global.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PMW_AdminHelper' not found in wp-content/plugins/pixel-manager-for-woocommerce/admin/class-pixel-manager-for-woocommerce-admin.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PMW_AdminHelper' not found in wp-content/plugins/pixel-manager-for-woocommerce/admin/partials/common/class-pmw-header.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pixel-manager-for-woocommerce/admin/partials/common/class-pmw-footer.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
  • Tags: There are too many tags (30 tag instead of maximum 10)
You can look at the official readme.txt

pixel-manager-for-woocommerce/pixel-manager-for-woocommerce.php 77% from 13 tests

The main file in "Pixel Tag Manager for WooCommerce (PTM) - All-in-One Tracking Solution for Google Analytics 4, Google Ads, Facebook and More" v. 1.4.2 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: The description should be shorter than 140 characters (currently 641 characters long)
  • Plugin Name: Please shorten the plugin name (currently 102 characters long instead of max. 70)
  • Requires at least: Required version does not match the one declared in readme.txt ("3.5.0" instead of "3.7.0")

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
No dangerous file extensions were detected5,892 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP271819044,002
CSS147161,459
JavaScript2365382
SVG70049

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.17
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods194
▷ Static methods21.03%
▷ Public methods16484.54%
▷ Protected methods2613.40%
▷ Private methods42.06%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/facebook_pixel.png0.34KB0.38KB0.00%
admin/images/main-icon.png1.34KB1.00KB▼ 25.29%
admin/images/google_ads.png1.25KB1.44KB0.00%
admin/images/Icon-notice.png0.75KB0.46KB▼ 38.48%
admin/images/tiktok_pixel.png0.94KB1.20KB0.00%