67% add-tiktok-advertising-pixel

Code Review | Add Tiktok Pixel for Tiktok ads (+Woocommerce)

WordPress plugin Add Tiktok Pixel for Tiktok ads (+Woocommerce) scored67%from 54 tests.

About plugin

  • Plugin page: add-tiktok-advert...
  • Plugin version: 1.2.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 42
  • Update frequency: every 32.6 days
  • Top authors: pagup (95.24%)The-Rock (7.14%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /26,533 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.66MB] [CPU: ▲30.03ms] Passed 4 tests

An overview of server-side resources used by Add Tiktok Pixel for Tiktok ads (+Woocommerce)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.99 ▲5.4873.10 ▲25.53
Dashboard /wp-admin33.06 ▲0.016,066,525.07 ▲9,709.98
Posts /wp-admin/edit.php9.01 ▲5.6185.71 ▲33.81
Add New Post /wp-admin/post-new.php9.48 ▲3.54126.94 ▲28.15
Media Library /wp-admin/upload.php9.01 ▲5.7470.47 ▲32.62
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.0164.29

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 214 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
fs_debug_mode
fs_active_plugins
fs_accounts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Tiktok Pixel for Tiktok ads (+Woocommerce)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.35 ▲0.011.54 ▼0.2440.52 ▼5.51
Dashboard /wp-admin2,235 ▲645.55 ▼0.1089.28 ▼12.1853.29 ▲10.15
Posts /wp-admin/edit.php2,144 ▲442.01 ▼0.0338.63 ▲3.2253.85 ▲14.83
Add New Post /wp-admin/post-new.php1,554 ▲2823.34 ▲0.22639.17 ▼96.1056.81 ▼1.36
Media Library /wp-admin/upload.php1,443 ▲404.22 ▲0.05101.89 ▼0.1459.48 ▲13.10
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1111.6927.5846.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/add-tiktok-advertising-pixel/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • fs_accounts
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_active_plugins
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/inc/top.view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/inc/promotions.view.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/inc/top.view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/inc/top.view.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\TiktokPixel\\Controllers\\SettingsController' not found in wp-content/plugins/add-tiktok-advertising-pixel/admin/Settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/notices/support.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/metabox.view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/inc/top.view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/inc/top.view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/add-tiktok-advertising-pixel/admin/views/inc/side.view.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: retargeting, tiktok, conversion, tiktok pixel, pixel

add-tiktok-advertising-pixel/tiktok-advertising-pixel.php 77% from 13 tests

The main PHP file in "Add Tiktok Pixel for Tiktok ads (+Woocommerce)" ver. 1.2.7 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("add-tiktok-advertising-pixel.php" instead of "tiktok-advertising-pixel.php")
  • Description: The description should be shorter than 140 characters (currently 179 characters long)

Code Analysis 97% from 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
There were no executable files found in this plugin35,297 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1458,40917,49134,816
CSS151716267
JavaScript43759206
JSON1008

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity74.90
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes00.00%
Methods1,318
▷ Static methods21816.54%
▷ Public methods92670.26%
▷ Protected methods191.44%
▷ Private methods37328.30%
Functions105
▷ Named functions10398.10%
▷ Anonymous functions21.90%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/metabox.png101.86KB28.34KB▼ 72.17%
vendor/freemius/assets/img/add-twitter-pixel.png9.16KB5.26KB▼ 42.58%
vendor/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%