83% ddt-tracking

Code Review | Adsfox - tracking Pixel

WordPress plugin Adsfox - tracking Pixel scored83%from 54 tests.

About plugin

  • Plugin page: ddt-tracking
  • Plugin version: 0.0.1.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.4-5.9.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2021
  • Latest release: Mar 2, 2022
  • Number of updates: 19
  • Update frequency: every 9.6 days
  • Top authors: datadriventool (73.68%)adsfox (31.58%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /763 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.05MB] [CPU: ▼11.10ms] Passed 4 tests

Server-side resources used by Adsfox - tracking Pixel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.83 ▼2.73
Dashboard /wp-admin3.38 ▲0.0345.40 ▼19.50
Posts /wp-admin/edit.php3.49 ▲0.1346.84 ▲4.03
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.27 ▼19.67
Media Library /wp-admin/upload.php3.30 ▲0.0732.20 ▼2.51
adsfox-info /wp-admin/admin.php?page=ddt-info-page3.2731.22
Adsfox tracking pixel /wp-admin/admin.php?page=DDT-navigator-settings-page3.4342.94

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 9 new options
New WordPress options
DDT_Facebook_events_url
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
DDT_Pixel_Facebook_auto_setup_apikey
DDT_Pixel_Facebook_auto_setup
can_compress_scripts

Browser metrics Passed 4 tests

Adsfox - tracking Pixel: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.33 ▼0.051.69 ▼0.0143.90 ▲0.26
Dashboard /wp-admin2,225 ▲545.74 ▲0.2184.90 ▼1.9539.70 ▲2.78
Posts /wp-admin/edit.php2,124 ▲212.03 ▼0.0134.21 ▼5.0133.29 ▼4.46
Add New Post /wp-admin/post-new.php1,553 ▲1622.95 ▲4.80664.51 ▲56.6951.27 ▼13.85
Media Library /wp-admin/upload.php1,421 ▲214.19 ▲0.0293.47 ▼0.5740.90 ▼2.53
adsfox-info /wp-admin/admin.php?page=ddt-info-page8182.1523.5823.88
Adsfox tracking pixel /wp-admin/admin.php?page=DDT-navigator-settings-page1,5332.2023.9671.84

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 9 options in the database
    • widget_recent-posts
    • DDT_Pixel_Facebook_auto_setup
    • can_compress_scripts
    • DDT_Facebook_events_url
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • DDT_Pixel_Facebook_auto_setup_apikey

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
  • 2× 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

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 "Adsfox - tracking Pixel" ver. 0.0.1.5 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,153 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP192851491,629
CSS4122701,027
JavaScript39311296
JSON100104
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.51
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%
Functions33
▷ Named functions33100.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