68% floating-tiktok-button

Code Review | Floating Tiktok button (Tiktok Follow button)+ Tikcode (QrCode) for Tiktok followers

WordPress plugin Floating Tiktok button (Tiktok Follow button)+ Tikcode (QrCode) for Tiktok followers scored68%from 54 tests.

About plugin

  • Plugin page: floating-tiktok-b...
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 31, 2021
  • Latest release: Aug 24, 2023
  • Number of updates: 17
  • Update frequency: every 42.5 days
  • Top authors: pagup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,021 total downloads

Benchmarks

Plugin footprint 65% 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.54MB] [CPU: ▲0.57ms] Passed 4 tests

Analyzing server-side resources used by Floating Tiktok button (Tiktok Follow button)+ Tikcode (QrCode) for Tiktok followers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6036.24 ▼0.20
Dashboard /wp-admin3.90 ▲0.6047.32 ▲2.50
Posts /wp-admin/edit.php3.95 ▲0.6048.21 ▼1.62
Add New Post /wp-admin/post-new.php6.42 ▲0.5393.83 ▲1.73
Media Library /wp-admin/upload.php3.66 ▲0.4436.48 ▲2.39
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0334.90

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 227 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
db_upgraded
fs_debug_mode
fs_accounts
fs_active_plugins
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
floating-tiktok-button
can_compress_scripts

Browser metrics Passed 4 tests

Floating Tiktok button (Tiktok Follow button)+ Tikcode (QrCode) for Tiktok followers: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.55 ▼0.831.61 ▲0.0431.03 ▼12.75
Dashboard /wp-admin2,240 ▲494.85 ▼0.04108.22 ▼1.5241.78 ▼0.23
Posts /wp-admin/edit.php2,123 ▲372.00 ▼0.0340.34 ▲3.2937.95 ▲1.02
Add New Post /wp-admin/post-new.php1,546 ▲1318.10 ▼5.41614.45 ▼59.1553.44 ▼7.63
Media Library /wp-admin/upload.php1,422 ▲374.21 ▲0.0396.76 ▼7.4645.70 ▼1.28
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0811.7123.4329.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/floating-tiktok-button/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • floating-tiktok-button
    • fs_accounts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/floating-tiktok-button/admin/views/inc/button_preview.view.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\TikTokButton\\Controllers\\SettingsController' not found in wp-content/plugins/floating-tiktok-button/admin/Settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/floating-tiktok-button/admin/views/button_qrcode.view.php:3
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/floating-tiktok-button/admin/views/button_styles.view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/floating-tiktok-button/admin/views/inc/top.view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/floating-tiktok-button/admin/views/inc/promotion.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/floating-tiktok-button/admin/views/button.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/floating-tiktok-button/admin/views/inc/step2.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/floating-tiktok-button/admin/views/inc/side.view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/floating-tiktok-button/admin/views/inc/top.view.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/floating-tiktok-button/admin/views/inc/top.view.php:5

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)
No browser issues were found

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
5 plugin tags: tiktok, tiktok widget, tiktok pixel, social button, conversion

floating-tiktok-button/floating-tiktok-button.php 85% from 13 tests

The main file in "Floating Tiktok button (Tiktok Follow button)+ Tikcode (QrCode) for Tiktok followers" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Description: Please don't use more than 140 characters for the plugin description (currently 162 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected39,543 lines of code in 177 files:
LanguageFilesBlank linesComment linesLines of code
PHP1488,41217,48435,224
JavaScript109395733,591
CSS166052705
SVG20016
JSON1007

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity77.42
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,316
▷ Static methods21616.41%
▷ Public methods92670.36%
▷ Protected methods171.29%
▷ Private methods37328.34%
Functions106
▷ Named functions10397.17%
▷ Anonymous functions32.83%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
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%
admin/assets/icon2.png8.53KB2.62KB▼ 69.26%
admin/assets/icon1.png4.47KB2.29KB▼ 48.76%