84% give-pixel-tracking

Code Review | Give - Pixel Tracking

WordPress plugin Give - Pixel Tracking scored84%from 54 tests.

About plugin

  • Plugin page: give-pixel-tracking
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.7
  • WordPress version: 6.3.1
  • First release: Nov 9, 2020
  • Latest release: Mar 6, 2021
  • Number of updates: 5
  • Update frequency: every 24.0 days
  • Top authors: webdevmattcrom (80%)jason_the_adams (40%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,701 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
Install script ran successfully

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

Server-side resources used by Give - Pixel Tracking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.43 ▲3.28
Dashboard /wp-admin3.29 ▼0.0237.04 ▼17.05
Posts /wp-admin/edit.php3.35 ▼0.0036.36 ▼16.51
Add New Post /wp-admin/post-new.php5.51 ▼0.3775.47 ▼14.94
Media Library /wp-admin/upload.php3.29 ▲0.0635.05 ▼3.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
recovery_mode_email_last_sent
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Give - Pixel Tracking
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,482 ▼1,27912.39 ▼1.722.20 ▲0.5238.95 ▼3.02
Dashboard /wp-admin850 ▼1,3271.36 ▼4.2914.23 ▼73.4119.49 ▼33.31
Posts /wp-admin/edit.php861 ▼1,2421.51 ▼0.516.66 ▼34.2520.13 ▼20.32
Add New Post /wp-admin/post-new.php587 ▼9411.71 ▼19.1220.17 ▼688.557.62 ▼53.38
Media Library /wp-admin/upload.php746 ▼6541.71 ▼2.4122.06 ▼90.8122.14 ▼24.12

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Interface 'Give\\ServiceProviders\\ServiceProvider' not found in wp-content/plugins/give-pixel-tracking/src/FacebookPixel/FacebookPixelServiceProvider.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Give_Settings_Page' not found in wp-content/plugins/give-pixel-tracking/src/FacebookPixel/SettingsPage.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: donations, givewp, conversion, facebook pixel

give-pixel-tracking/give-fbpt.php 85% from 13 tests

"Give - Pixel Tracking" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("give-pixel-tracking.php" instead of "give-fbpt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin913 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP23304423876
Sass23115
JSON20012
JavaScript3109
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.27
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods63
▷ Static methods3250.79%
▷ Public methods5993.65%
▷ Protected methods00.00%
▷ Private methods46.35%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants7
▷ Global constants7100.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
No PNG files were detected