84% gf-facebook-pixel-tracking

Code Review | Tracking Pixel for Gravity Forms

WordPress plugin Tracking Pixel for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: gf-facebook-pixel...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Aug 1, 2018
  • Latest release: Jul 10, 2021
  • Number of updates: 18
  • Update frequency: every 59.7 days
  • Top authors: pvigilante (61.11%)hiilite (44.44%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /5,601 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼12.92ms] Passed 4 tests

Analyzing server-side resources used by Tracking Pixel for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.28 ▲3.98
Dashboard /wp-admin3.31 ▼0.0449.79 ▼16.59
Posts /wp-admin/edit.php3.36 ▲0.0047.29 ▼8.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.26 ▼23.17
Media Library /wp-admin/upload.php3.23 ▲0.0038.24 ▼3.16

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Tracking Pixel for Gravity Forms
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.10 ▼0.182.42 ▲0.7043.13 ▲1.83
Dashboard /wp-admin2,195 ▲185.62 ▼0.0292.12 ▼1.0142.01 ▼0.43
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0137.28 ▼4.8434.57 ▲0.26
Add New Post /wp-admin/post-new.php1,531 ▲323.07 ▲0.05698.14 ▲20.8255.39 ▼10.95
Media Library /wp-admin/upload.php1,400 ▼04.25 ▼0.00100.99 ▼10.7947.13 ▼0.66

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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 | 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gf-facebook-pixel-tracking/includes/GFFBPT_Submission_Feeds.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gf-facebook-pixel-tracking/includes/GFFBPT_FBP.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: event tracking, facebook, facebook pixel, gravity forms

gf-facebook-pixel-tracking/gf-facebook-pixel-tracking.php Passed 13 tests

Analyzing the main PHP file in "Tracking Pixel for Gravity Forms" version 1.0.4
120 characters long description:
This plugin provides an easy way to add Facebook event tracking to your Gravity Forms using Facebook’s Tracking Pixel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected765 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6162402603
PO File1324398
Bourne Shell121964

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.40
▷ Minimum class complexity3.00
▷ Maximum class complexity40.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods48
▷ Static methods918.75%
▷ Public methods3572.92%
▷ Protected methods00.00%
▷ Private methods1327.08%
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

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.45MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png66.27KB20.45KB▼ 69.15%
assets/screenshot-2.png97.07KB29.04KB▼ 70.08%
assets/screenshot-3.png60.80KB17.66KB▼ 70.95%
assets/banner-772x250.png47.08KB34.19KB▼ 27.38%
assets/icon-256x256.png191.91KB68.66KB▼ 64.22%