72% feed-for-tiktok

Code Review | Feed for TikTok

WordPress plugin Feed for TikTok scored 72% from 54 tests.

About plugin

  • Plugin page: feed-for-tiktok
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.7
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: May 6, 2021
  • Number of updates: 10
  • Update frequency: every 0.6 days
  • Top authors: sabingeorge (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

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

Server metrics [RAM: ▲1.67MB] [CPU: ▲11.68ms] Passed 4 tests

A check of server-side resources used by Feed for TikTok
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.15 ▲1.6958.53 ▲16.56
Dashboard /wp-admin5.02 ▲1.7260.60 ▲9.71
Posts /wp-admin/edit.php5.07 ▲1.7159.08 ▲13.83
Add New Post /wp-admin/post-new.php7.55 ▲1.67106.23 ▲10.32
Media Library /wp-admin/upload.php4.85 ▲1.6347.80 ▲12.87

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

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

Browser metrics Passed 4 tests

Feed for TikTok: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,314 ▲57919.99 ▲5.3922.96 ▲21.2946.55 ▲5.31
Dashboard /wp-admin2,479 ▲2889.24 ▲3.33158.18 ▲55.6193.99 ▲51.97
Posts /wp-admin/edit.php2,406 ▲3176.13 ▲4.1483.07 ▲47.2261.66 ▲30.07
Add New Post /wp-admin/post-new.php1,595 ▲7219.97 ▼1.10717.03 ▼29.9838.89 ▼18.36
Media Library /wp-admin/upload.php1,536 ▲1486.53 ▲2.34106.55 ▼1.6681.89 ▲34.76
Tik Tok /wp-admin/crb_carbon_fields_container_tik_tok.php260.440.0913.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/feed-for-tiktok/public/presentation/profile.php
    • > /wp-content/plugins/feed-for-tiktok/public/presentation/feed/item-slide.php
    • > /wp-content/plugins/feed-for-tiktok/public/presentation/feed/items.php
    • > /wp-content/plugins/feed-for-tiktok/public/presentation/feed/item-modal.php
    • > /wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 217× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/core/Field/Textarea_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/core/Field/Sidebar_Field.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/feed-for-tiktok/public/presentation/profile.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/core/Container/Post_Meta_Container.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/core/Datastore/User_Meta_Datastore.php:10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/feed-for-tiktok/public/presentation/profile.php on line 34
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/core/Container/Condition/Blog_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Event\\PersistentListener' not found in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/core/Event/SingleEventListener.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/feed-for-tiktok/vendor/htmlburger/carbon-fields/core/Field/Checkbox_Field.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/crb_carbon_fields_container_tik_tok.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_tik_tok.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: tiktok elementor, tiktok, tiktok gallery, tiktok widget elementor, tiktok carousel elementor...

feed-for-tiktok/tik-tok-feed.php 77% from 13 tests

The main file in "Feed for TikTok" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("feed-for-tiktok.php" instead of "tik-tok-feed.php")
  • Description: Make the plugin description longer than 10 characters (currently 1 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin33,711 lines of code in 494 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1875,6309,00414,922
PHP2042,9816,91811,328
PO File278901,1082,364
Sass52449182,281
CSS133291,1512,195
JSON500496
Markdown425073
SVG21152

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.91
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces37
Interfaces22
Traits1
Classes154
▷ Abstract classes1610.39%
▷ Concrete classes13889.61%
▷ Final classes10.72%
Methods1,026
▷ Static methods969.36%
▷ Public methods82280.12%
▷ Protected methods17216.76%
▷ Private methods323.12%
Functions108
▷ Named functions2624.07%
▷ Anonymous functions8275.93%
Constants40
▷ Global constants1127.50%
▷ Class constants2972.50%
▷ Public constants2586.21%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tik-tok.png18.87KB8.20KB▼ 56.57%
images/tik-tok-menu-icon.png1.85KB0.95KB▼ 48.60%