73% baidu-submit-link

Code Review | 多合一搜索自动推送管理插件-支持Baidu/Google/Bing/IndexNow/Yandex/头条

WordPress plugin 多合一搜索自动推送管理插件-支持Baidu/Google/Bing/IndexNow/Yandex/头条 scored73%from 54 tests.

About plugin

  • Plugin page: baidu-submit-link
  • Plugin version: 4.2.7
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Sep 19, 2023
  • Number of updates: 106
  • Update frequency: every 25.5 days
  • Top authors: wbolt (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

8,000+ active /214,768 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.86MB] [CPU: ▲7.28ms] Passed 4 tests

An overview of server-side resources used by 多合一搜索自动推送管理插件-支持Baidu/Google/Bing/IndexNow/Yandex/头条
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.8848.69 ▲7.48
Dashboard /wp-admin4.19 ▲0.8959.60 ▲7.82
Posts /wp-admin/edit.php4.25 ▲0.8954.45 ▲9.30
Add New Post /wp-admin/post-new.php6.71 ▲0.8388.72 ▲4.50
Media Library /wp-admin/upload.php4.05 ▲0.8350.51 ▲15.87

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 57 new files
Database: 3 new tables, 7 new options
New tables
wp_wb_bsl_stats
wp_wb_bsl_day
wp_wb_bsl_log
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
bsl_version
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for 多合一搜索自动推送管理插件-支持Baidu/Google/Bing/IndexNow/Yandex/头条
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲12313.32 ▼1.272.17 ▲0.4744.35 ▲0.14
Dashboard /wp-admin2,235 ▲445.84 ▲0.93111.22 ▼6.2395.21 ▲54.14
Posts /wp-admin/edit.php2,130 ▲442.00 ▼0.0634.41 ▼2.1042.22 ▲5.52
Add New Post /wp-admin/post-new.php1,706 ▲17522.24 ▲4.04738.40 ▲109.0354.12 ▲0.50
Media Library /wp-admin/upload.php1,432 ▲414.18 ▼0.0496.46 ▼9.9885.18 ▲41.76
数据统计 /wp-admin/admin.php?page=wb_bsl#/stats-base1,2858.04147.09167.64
推送日志 /wp-admin/admin.php?page=wb_bsl#/log1,4956.3080.65120.97
插件设置 /wp-admin/admin.php?page=wb_bsl#/setting1,5256.2474.8393.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_wb_bsl_stats
    • wp_wb_bsl_day
    • wp_wb_bsl_log
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • bsl_version
    • theysaidso_admin_options

Smoke tests 75% 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 50% 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
Please fix the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/google.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/baidu.class.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/app.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/yandex.class.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/bing.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/daily.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/site.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WB_BSL_Base' not found in wp-content/plugins/baidu-submit-link/classes/indexnow.class.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
8 plugin tags: yandex, bing, indexnow, baidu, google...

baidu-submit-link/index.php 77% from 13 tests

Analyzing the main PHP file in "多合一搜索自动推送管理插件-支持Baidu/Google/Bing/IndexNow/Yandex/头条" version 4.2.7
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("baidu-submit-link.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 405 characters long)
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "7.0.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin5,176 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,2914245,105
JavaScript2303266
SVG1003
CSS2032

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 218)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity68.14
▷ Minimum class complexity4.00
▷ Maximum class complexity345.00
Average method complexity7.24
▷ Minimum method complexity1.00
▷ Maximum method complexity218.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods148
▷ Static methods13993.92%
▷ Public methods148100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 compressed PNG files occupy 0.08MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/bsl.png28.97KB28.95KB0.06%
tpl/assets/img/bsl.abf3bf80.png28.97KB28.95KB0.06%
tpl/assets/img/introduction_hd.88def992.png22.46KB22.46KB0.00%