10% wp-xintaoke

Code Review | 新淘客WordPress插件

WordPress plugin 新淘客WordPress插件 scored10%from 54 tests.

About plugin

  • Plugin page: wp-xintaoke
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 22, 2013
  • Latest release: Apr 12, 2014
  • Number of updates: 277
  • Update frequency: every 1.6 days
  • Top authors: fxy060608 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /11,871 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-xintaoke/wp-xintaoke.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Xintaoke has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼53.35ms] Passed 4 tests

Server-side resources used by 新淘客WordPress插件
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.16 ▼32.29
Dashboard /wp-admin2.20 ▼1.145.99 ▼46.72
Posts /wp-admin/edit.php2.20 ▼1.158.36 ▼35.82
Add New Post /wp-admin/post-new.php2.20 ▼3.686.11 ▼98.55
Media Library /wp-admin/upload.php2.20 ▼1.035.70 ▼29.46
Tags /wp-admin/edit-tags.php?taxonomy=daogou_tag&post_type=daogou2.206.35
新建导购 /wp-admin/post-new.php?post_type=daogou2.206.08
所有导购 /wp-admin/edit.php?post_type=daogou2.206.90
会员 /wp-admin/admin.php?page=xt_menu_member2.205.73
Categories /wp-admin/edit-tags.php?taxonomy=daogou_category&post_type=daogou2.205.66
新建帮助 /wp-admin/post-new.php?post_type=help2.207.23
返现 /wp-admin/admin.php?page=xt_menu_fanxian2.207.22
新淘客 /wp-admin/admin.php?page=xt_menu_sys2.205.60
分享 /wp-admin/admin.php?page=xt_menu_share2.206.33
Tags /wp-admin/edit-tags.php?taxonomy=help_tag&post_type=help2.206.50

Server storage [IO: ▲22.05MB] [DB: ▲0.26MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 563 new files
Database: 26 new tables, 14 new options
New tables
wp_xt_fanxian_log
wp_xt_catalog_itemcat
wp_xt_album
wp_xt_user_jifen_item
wp_xt_share_album
wp_xt_user_notice
wp_xt_catalog
wp_xt_share_tag
wp_xt_tixian
wp_xt_share_catalog
...
New WordPress options
xt_option_env
xt_option_platform
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
xt_option_mail
xt_option_version_db
xt_option_version
xt_option_global
...

Browser metrics Passed 4 tests

An overview of browser requirements for 新淘客WordPress插件
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.95 ▼0.8013.94 ▲12.3450.73 ▲6.88
Dashboard /wp-admin2,339 ▲1475.87 ▲0.9399.84 ▼10.9563.56 ▲22.17
Posts /wp-admin/edit.php2,231 ▲1422.04 ▲0.0439.49 ▲3.5454.59 ▲18.66
Add New Post /wp-admin/post-new.php1,652 ▲11418.21 ▼4.96610.90 ▼61.0067.86 ▲9.52
Media Library /wp-admin/upload.php1,524 ▲1364.23 ▲0.0297.47 ▼8.5758.92 ▲13.00
Tags /wp-admin/edit-tags.php?taxonomy=daogou_tag&post_type=daogou1,3672.2830.7852.57
新建导购 /wp-admin/post-new.php?post_type=daogou3,0077.95184.29147.44
所有导购 /wp-admin/edit.php?post_type=daogou1,2442.0236.6860.47
会员 /wp-admin/admin.php?page=xt_menu_member1,2281.8929.0051.80
Categories /wp-admin/edit-tags.php?taxonomy=daogou_category&post_type=daogou1,3982.3130.1444.71
新建帮助 /wp-admin/post-new.php?post_type=help2,8767.94171.7884.47
返现 /wp-admin/admin.php?page=xt_menu_fanxian1,3563.8577.8348.75
新淘客 /wp-admin/admin.php?page=xt_menu_sys1,2921.9534.1968.24
分享 /wp-admin/admin.php?page=xt_menu_share3,2681.8427.5184.12
Tags /wp-admin/edit-tags.php?taxonomy=help_tag&post_type=help1,3672.3129.1951.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-xintaoke/wp-xintaoke.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Xintaoke has a deprecated constructor
  • This plugin does not fully uninstall, leaving 26 tables in the database
    • wp_xt_share_tag
    • wp_xt_fanxian
    • wp_xt_user_follow
    • wp_xt_user_jifen_item
    • wp_xt_taobao_report
    • wp_xt_paipai_report
    • wp_xt_taobao_itemcat
    • wp_xt_share_comment
    • wp_xt_share_match
    • wp_xt_user_jifen_log
    • ...
  • The uninstall procedure has failed, leaving 14 options in the database
    • db_upgraded
    • xt_option_mail
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • xt_option_platform
    • xt_option_catalog_share
    • widget_recent-posts
    • xt_option_fanxian
    • xt_option_global
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=help_tag&post_type=help
    • > Deprecated in wp-content/plugins/wp-xintaoke/wp-xintaoke.php+32
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Xintaoke has a deprecated constructor
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=help_tag&post_type=help
    • > Deprecated in wp-content/plugins/wp-xintaoke/xt-core/xt-constants.php+342
    Function create_function() is deprecated
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=help_tag&post_type=help
    • > Deprecated in wp-content/plugins/wp-xintaoke/xt-includes/widgets.php+1875
    Methods with the same name as their class will not be constructors in a future version of PHP; XT_Widget_Factory has a deprecated constructor
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=help_tag&post_type=help
    • > Deprecated in wp-content/plugins/wp-xintaoke/xt-includes/breadcrumbs.class.php+111
    Methods with the same name as their class will not be constructors in a future version of PHP; xt_breadcrumbs has a deprecated constructor

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 fix the following items
  • 18× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-xintaoke/xt-core/js/ueditor/php/getContent.php
    • > /wp-content/plugins/wp-xintaoke/xt-core/sdks/weibo/index.php
    • > /wp-content/plugins/wp-xintaoke/xt-core/sdks/yiqifa/test.php
    • > /wp-content/plugins/wp-xintaoke/xt-admin/widget_itemcats.php
    • > /wp-content/plugins/wp-xintaoke/xt-themes/xt-share_box.php
    • > /wp-content/plugins/wp-xintaoke/xt-admin/sys_pages.php
    • > /wp-content/plugins/wp-xintaoke/xt-admin/sys_theme.php
    • > /wp-content/plugins/wp-xintaoke/xt-core/sdks/weibo/weibolist.php
    • > /wp-content/plugins/wp-xintaoke/xt-core/js/ueditor/php/fileUp.php
    • > /wp-content/plugins/wp-xintaoke/xt-core/js/ueditor/php/scrawlUp.php
  • 98× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(XT_PLUGIN_DIR/xt-core/sdks/paipai/lib/HttpClient.class.php): failed to open stream: No such file or directory in wp-content/plugins/wp-xintaoke/xt-core/sdks/paipai/src/PaiPaiOpenApiOauth.php on line 10
    • > PHP Warning
      Use of undefined constant XT_PLUGIN_DIR - assumed 'XT_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-xintaoke/xt-core/sdks/paipai/src/PaiPaiOpenApiOauth.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-xintaoke/xt-themes/account/xt-tuiguang-order.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-xintaoke/xt-admin/sys_tool.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-xintaoke/xt-themes/xt-header.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_User' not found in wp-content/plugins/wp-xintaoke/xt-admin/user_box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wp-xintaoke/xt-themes/account/xt-info.php:4
    • > PHP Notice
      Undefined index: ed in wp-content/plugins/wp-xintaoke/xt-themes/account/xt-orders-yiqifa.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/wp-xintaoke/xt-admin/fanxian_paipai.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wp-xintaoke/xt-admin/user_box_list.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=xt_menu_member
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=xt_menu_member:289:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=xt_menu_share
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=xt_menu_sys
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=xt_menu_sys:373:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=xt_menu_sys
    • > Network (severe)
    http://plugin.xintaonet.com/version.js?_=1696850390787 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=xt_menu_share
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=xt_menu_share:1045:31)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-xintaoke === )
Please take inspiration from this readme.txt

wp-xintaoke/wp-xintaoke.php 92% from 13 tests

Analyzing the main PHP file in "新淘客WordPress插件" version 1.1.2
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 203 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/wp-xintaoke/xt-core/js/ueditor/third-party/snapscreen/UEditorSnapscreen.exe
      • wp-content/plugins/wp-xintaoke/xt-core/js/ueditor/third-party/snapscreen/setup.exe
102,328 lines of code in 337 files:
LanguageFilesBlank linesComment linesLines of code
PHP2395,3756,57471,055
JavaScript442,9965,33324,756
CSS273883324,040
HTML235021,914
INI25668458
PO File199215103
YAML1002

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.09
▷ Minimum class complexity1.00
▷ Maximum class complexity319.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes181
▷ Abstract classes00.00%
▷ Concrete classes181100.00%
▷ Final classes00.00%
Methods2,012
▷ Static methods321.59%
▷ Public methods1,97598.16%
▷ Protected methods221.09%
▷ Private methods150.75%
Functions954
▷ Named functions954100.00%
▷ Anonymous functions00.00%
Constants345
▷ Global constants34499.71%
▷ Class constants10.29%
▷ Public constants1100.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
119 PNG files occupy 0.65MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
xt-core/js/ueditor/themes/default/images/filescan.png4.18KB1.58KB▼ 62.19%
xt-themes/images/fanxian_box_paipai.png23.88KB10.36KB▼ 56.63%
xt-themes/images/temai-990-220.png12.48KB11.82KB▼ 5.25%
xt-core/js/datepicker/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
xt-core/js/ueditor/dialogs/template/images/list.png10.57KB4.12KB▼ 61.02%