84% feed-for-tiktok-shop

Code Review | Feed For TikTok Shop

WordPress plugin Feed For TikTok Shop scored84%from 54 tests.

About plugin

  • Plugin page: feed-for-tiktok-shop
  • Plugin version: 1.0.13
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.3
  • WordPress version: 6.3.1
  • First release: May 24, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 15
  • Update frequency: every 34.7 days
  • Top authors: aftership (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /3,005 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▲1.13ms] Passed 4 tests

A check of server-side resources used by Feed For TikTok Shop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.74 ▲0.70
Dashboard /wp-admin3.38 ▲0.0748.06 ▲2.03
Posts /wp-admin/edit.php3.49 ▲0.1346.78 ▲5.80
Add New Post /wp-admin/post-new.php5.96 ▲0.0779.86 ▼0.25
Media Library /wp-admin/upload.php3.30 ▲0.0734.83 ▲2.02

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Feed For TikTok Shop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.35 ▲0.071.68 ▲0.0143.55 ▼0.27
Dashboard /wp-admin2,224 ▲445.57 ▼0.0894.98 ▲2.9776.98 ▲33.57
Posts /wp-admin/edit.php2,132 ▲322.00 ▼0.1532.50 ▼9.0230.57 ▼10.55
Add New Post /wp-admin/post-new.php1,556 ▲2122.96 ▲4.87699.20 ▲46.6368.42 ▲9.73
Media Library /wp-admin/upload.php1,432 ▲354.22 ▲0.0592.86 ▼4.9982.25 ▲40.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • feed_option_name
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/feed-for-tiktok-shop/includes/api/feed/v1/class-am-feed-rest-settings-controller.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/feed-for-tiktok-shop/views/feed-landing-view.php:172

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
3 plugin tags: product feed, woocommerce, tiktok shop

feed-for-tiktok-shop/tiktok-shopping.php 92% from 13 tests

The primary PHP file in "Feed For TikTok Shop" version 1.0.13 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("feed-for-tiktok-shop.php" instead of "tiktok-shopping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin514 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP470188422
SVG30063
JSON10029

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.67
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 2.24MB with 1.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png32.60KB9.49KB▼ 70.90%
assets/screenshot-1.png726.29KB411.30KB▼ 43.37%
assets/icon-256x256.png5.89KB2.83KB▼ 51.89%
assets/icon-128x128.png3.01KB1.53KB▼ 49.06%
assets/screenshot-3.png782.40KB421.84KB▼ 46.08%