90% zhanzhangb-baidu-submit

Code Review | 自动提交百度收录插件

WordPress plugin 自动提交百度收录插件 scored90%from 54 tests.

About plugin

  • Plugin page: zhanzhangb-baidu-...
  • Plugin version: 1.8.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2020
  • Latest release: Nov 28, 2023
  • Number of updates: 23
  • Update frequency: every 56.9 days
  • Top authors: ywtywt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /11,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.76ms] Passed 4 tests

A check of server-side resources used by 自动提交百度收录插件
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.39 ▼1.70
Dashboard /wp-admin3.38 ▲0.0446.91 ▼12.84
Posts /wp-admin/edit.php3.43 ▲0.0848.15 ▼2.92
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.18 ▼4.83
Media Library /wp-admin/upload.php3.30 ▲0.0833.90 ▼2.46
站长帮 - 自动提交百度收录设置 /wp-admin/options-general.php?page=zhanzhangb_baidu_submit3.2730.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
zhanzhangb_baidu_submit_number
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

自动提交百度收录插件: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲5814.72 ▲0.371.64 ▲0.0340.51 ▼4.04
Dashboard /wp-admin2,202 ▲285.64 ▲0.0091.72 ▼5.9146.56 ▲6.16
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0140.78 ▼0.8541.66 ▲4.26
Add New Post /wp-admin/post-new.php1,529 ▲323.14 ▲0.05587.67 ▼61.1652.91 ▲0.77
Media Library /wp-admin/upload.php1,404 ▲14.20 ▼0.0496.18 ▼0.9346.17 ▲0.38
站长帮 - 自动提交百度收录设置 /wp-admin/options-general.php?page=zhanzhangb_baidu_submit8342.1525.43105.64

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: baidu, seo

zhanzhangb-baidu-submit/zhanzhangb-baidu-submit.php Passed 13 tests

The main file in "自动提交百度收录插件" v. 1.8.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
121 characters long description:
发布/更新文章或页面时,实时推送URL至百度搜索资源平台,支持普通收录与快速收录提交。

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
Everything looks great! No dangerous files found in this plugin241 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2121241

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1168.75%
▷ Protected methods00.00%
▷ Private methods531.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin