84% sahu-tiktok-pixel

Code Review | SAHU TikTok Pixel for E-Commerce

WordPress plugin SAHU TikTok Pixel for E-Commerce scored84%from 54 tests.

About plugin

  • Plugin page: sahu-tiktok-pixel
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2021
  • Latest release: Apr 28, 2023
  • Number of updates: 13
  • Update frequency: every 56.5 days
  • Top authors: sahumedia (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

4,000+ active /17,605 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.69ms] Passed 4 tests

Analyzing server-side resources used by SAHU TikTok Pixel for E-Commerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.93 ▼7.48
Dashboard /wp-admin3.34 ▲0.0448.14 ▼7.23
Posts /wp-admin/edit.php3.39 ▲0.0362.23 ▲8.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.41 ▼13.39
Media Library /wp-admin/upload.php3.26 ▲0.0339.37 ▲5.33

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

SAHU TikTok Pixel for E-Commerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13515.19 ▲0.9157.55 ▲55.3445.49 ▲1.85
Dashboard /wp-admin2,207 ▲305.61 ▲0.0286.94 ▼1.9438.71 ▼5.82
Posts /wp-admin/edit.php2,115 ▲121.98 ▼0.0341.38 ▼1.5335.33 ▼3.82
Add New Post /wp-admin/post-new.php1,536 ▲523.06 ▼0.22659.27 ▼32.7954.31 ▲5.01
Media Library /wp-admin/upload.php1,415 ▲184.22 ▼0.02101.12 ▼0.5245.02 ▲0.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sahu-tiktok-pixel/tiktok-api/function.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sahu-tiktok-pixel/include/admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sahu-tiktok-pixel/main.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: tiktok business, woocommerce tiktok, tiktok pixel, tiktok woocommerce, tiktok tracking

sahu-tiktok-pixel/main.php 85% from 13 tests

Analyzing the main PHP file in "SAHU TikTok Pixel for E-Commerce" version 1.2.2
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sahu-tiktok-pixel.php" instead of "main.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin354 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP47142185
PO File44040169

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin