83% ddt-tracking

Code Review | Data Driven Tool - tracking Pixel

WordPress plugin Data Driven Tool - tracking Pixel scored 83% from 54 tests.

About plugin

  • Plugin page: ddt-tracking
  • Plugin version: 0.0.1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.4-5.8
  • WordPress version: 5.8.1
  • First release: Aug 31, 2021
  • Latest release: Nov 16, 2021
  • Number of updates: 6
  • Update frequency: every 12.8 days
  • Top authors: datadriventool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 91 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼139.87ms] Passed 4 tests

Server-side resources used by Data Driven Tool - tracking Pixel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.58 ▲18.32
Dashboard /wp-admin3.14 ▲0.0944.09 ▲5.67
Posts /wp-admin/edit.php3.19 ▲0.0944.17 ▲1.47
Add New Post /wp-admin/post-new.php5.51 ▲0.0794.02 ▼559.32
Media Library /wp-admin/upload.php3.08 ▲0.0830.99 ▼7.30
DDT tracking pixel /wp-admin/admin.php?page=DDT-navigator-settings-page3.3237.65
ddt-info /wp-admin/admin.php?page=ddt-info-page3.0626.71

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 3 new options
New WordPress options
DDT_Pixel_Facebook_auto_setup_apikey
DDT_Pixel_Facebook_auto_setup
DDT_Facebook_events_url

Browser metrics Passed 4 tests

Data Driven Tool - tracking Pixel: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲10615.83 ▲0.228.26 ▼1.4242.03 ▼5.10
Dashboard /wp-admin3,007 ▲765.87 ▼0.09136.80 ▼4.31114.33 ▼0.24
Posts /wp-admin/edit.php2,773 ▲342.72 ▲0.0061.86 ▼3.8292.72 ▼1.33
Add New Post /wp-admin/post-new.php3,562 ▲2,05614.66 ▼3.82407.66 ▲46.27114.95 ▲1.29
Media Library /wp-admin/upload.php1,841 ▲315.04 ▲0.01147.88 ▲2.64121.37 ▼5.49
DDT tracking pixel /wp-admin/admin.php?page=DDT-navigator-settings-page2,3862.3553.40177.34
ddt-info /wp-admin/admin.php?page=ddt-info-page1,2102.3453.61108.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 3 options in the database
    • DDT_Pixel_Facebook_auto_setup_apikey
    • DDT_Facebook_events_url
    • DDT_Pixel_Facebook_auto_setup

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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ddt-tracking/wpajax/ajax.php:39
    • > PHP Notice
      Undefined variable: dd_array_table in wp-content/plugins/ddt-tracking/frontend/elements/table.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ddt-tracking/wpajax/api.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Facebook Pixel basic setup), #2 (E-commerce & Contact Form tracking with plugin detection), #3 (With consent mode for Cookieplugins), #4 (Custom Events with all Facebook Events possible), #5 (Create simple, custom URL Events)
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

ddt-tracking/ddt_tracking_pixel.php 92% from 13 tests

The main PHP file in "Data Driven Tool - tracking Pixel" ver. 0.0.1.2 adds more information about the plugin and also serves as the entry point for this plugin
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 ("ddt-tracking.php" instead of "ddt_tracking_pixel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected3,373 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP203391511,753
CSS4122701,027
JavaScript39511288
JSON200208
SVG11197

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods360.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin