78% cm-tiktok-feed

Code Review | Feed Widget for TikTok

WordPress plugin Feed Widget for TikTok scored78%from 54 tests.

About plugin

  • Plugin page: cm-tiktok-feed
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 22, 2020
  • Latest release: Jul 22, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: webtemyk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,732 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲1.52MB] [CPU: ▲5.66ms] Passed 4 tests

An overview of server-side resources used by Feed Widget for TikTok
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.65 ▲1.1847.48 ▲6.33
Dashboard /wp-admin4.96 ▲1.6263.81 ▲0.08
Posts /wp-admin/edit.php5.00 ▲1.6556.76 ▲12.50
Add New Post /wp-admin/post-new.php7.55 ▲1.67102.75 ▲3.72
Media Library /wp-admin/upload.php4.87 ▲1.6553.01 ▲21.86
Feeds /wp-admin/admin.php?page=feeds-wtiktok5.08305.53
Widgets /wp-admin/admin.php?page=widgets-wtiktok4.8739.13

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 243 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
wtik_plugin_activated
wtik_plugin_version
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_wtiktok_feed
wtik_last_check_premium_update_time

Browser metrics Passed 4 tests

A check of browser resources used by Feed Widget for TikTok
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲17713.84 ▼0.576.12 ▲4.0342.08 ▼1.44
Dashboard /wp-admin2,235 ▲505.84 ▲0.9199.76 ▼10.5437.62 ▼5.17
Posts /wp-admin/edit.php2,118 ▲292.02 ▲0.0335.05 ▼2.1832.62 ▼0.25
Add New Post /wp-admin/post-new.php1,542 ▲1422.66 ▲4.28674.60 ▲50.2663.00 ▲12.59
Media Library /wp-admin/upload.php1,423 ▲324.25 ▲0.0798.91 ▼4.1146.28 ▲1.54
Feeds /wp-admin/admin.php?page=feeds-wtiktok8931.9637.6430.17
Widgets /wp-admin/admin.php?page=widgets-wtiktok8351.9727.2424.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • wtik_last_check_premium_update_time
    • wtik_plugin_activated
    • can_compress_scripts
    • widget_wtiktok_feed
    • db_upgraded
    • widget_theysaidso_widget
    • wtik_plugin_version

Smoke tests 50% 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cm-tiktok-feed/html_templates/thumbs-no-border.php
    • > /wp-content/plugins/cm-tiktok-feed/html_templates/thumbs.php
    • > /wp-content/plugins/cm-tiktok-feed/html_templates/slider-overlay.php
    • > /wp-content/plugins/cm-tiktok-feed/admin/views/tab-widgets.php
    • > /wp-content/plugins/cm-tiktok-feed/html_templates/slider.php
  • 50× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cm-tiktok-feed/html_templates/slider.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cm-tiktok-feed/html_templates/thumbs-no-border.php on line 8
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/cm-tiktok-feed/html_templates/thumbs.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cm-tiktok-feed/html_templates/slider.php on line 35
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/cm-tiktok-feed/html_templates/slider-overlay.php on line 36
    • > PHP Warning
      Use of undefined constant WTIK_PLUGIN_URL - assumed 'WTIK_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-tiktok-feed/admin/views/tab-about.php on line 77
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/cm-tiktok-feed/html_templates/slider.php on line 35
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/cm-tiktok-feed/html_templates/slider-overlay.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cm-tiktok-feed/html_templates/slider-overlay.php on line 11
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/cm-tiktok-feed/html_templates/slider.php on line 32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
4 plugin tags: feed, tiktok, video, widget

cm-tiktok-feed/cm-tiktok-feed.php 85% from 13 tests

This is the main PHP file of "Feed Widget for TikTok" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis Passed 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 plugin15,775 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
PHP1263,2057,86711,288
CSS253602622,456
PO File7366429980
LESS111828555
JavaScript14102117459
SVG10026
Bourne Shell1209
Markdown1102

PHP code Passed 2 tests

A short review 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.45
Average class complexity15.70
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces10
Interfaces2
Traits1
Classes100
▷ Abstract classes1414.00%
▷ Concrete classes8686.00%
▷ Final classes22.33%
Methods708
▷ Static methods446.21%
▷ Public methods53976.13%
▷ Protected methods11516.24%
▷ Private methods547.63%
Functions22
▷ Named functions1150.00%
▷ Anonymous functions1150.00%
Constants62
▷ Global constants5182.26%
▷ Class constants1117.74%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 1.27MB with 0.87MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image.png2.97KB0.15KB▼ 94.84%
admin/assets/img/slider icon.png24.19KB4.15KB▼ 82.85%
admin/assets/img/about/2019-11-01_11-03-07.png457.52KB124.21KB▼ 72.85%
admin/assets/img/tiktok.png2.54KB1.74KB▼ 31.43%
libs/factory/pages/templates/assets/img/webcraftic-plugin-icon.png1.97KB0.75KB▼ 61.79%