80% apoyl-baidupush

Code Review | [凹凸曼]百度推送百度收录SEO

WordPress plugin [凹凸曼]百度推送百度收录SEO scored80%from 54 tests.

About plugin

  • Plugin page: apoyl-baidupush
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Nov 19, 2020
  • Latest release: Nov 23, 2023
  • Number of updates: 25
  • Update frequency: every 44.0 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,864 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.02ms] Passed 4 tests

An overview of server-side resources used by [凹凸曼]百度推送百度收录SEO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.45 ▼3.87
Dashboard /wp-admin3.39 ▲0.0847.53 ▼1.27
Posts /wp-admin/edit.php3.50 ▲0.1447.91 ▲1.41
Add New Post /wp-admin/post-new.php5.97 ▲0.0891.51 ▲2.75
Media Library /wp-admin/upload.php3.31 ▲0.0831.23 ▼4.33
Baidu pushes Baidu to include SEO /wp-admin/options-general.php?page=apoyl-baidupush-settings3.2832.89

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: 1 new table, 8 new options
New tables
wp_apoyl_baidupush
New WordPress options
can_compress_scripts
apoyl_baidupush_db_version
widget_recent-posts
apoyl-baidupush-settings
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

[凹凸曼]百度推送百度收录SEO: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲8813.76 ▼0.958.46 ▲6.6838.21 ▼4.47
Dashboard /wp-admin2,202 ▲225.59 ▼0.0595.04 ▼3.6041.65 ▲1.87
Posts /wp-admin/edit.php2,104 ▲41.97 ▲0.0339.34 ▲0.6334.18 ▼1.63
Add New Post /wp-admin/post-new.php1,529 ▲322.74 ▼0.26583.82 ▼82.3751.98 ▼9.55
Media Library /wp-admin/upload.php1,401 ▼24.23 ▲0.0696.15 ▼12.5439.95 ▼8.22
Baidu pushes Baidu to include SEO /wp-admin/options-general.php?page=apoyl-baidupush-settings8772.1522.9844.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_apoyl_baidupush
  • Zombie WordPress options detected upon uninstall: 7 options
    • apoyl_baidupush_db_version
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: seo, baidu

apoyl-baidupush/apoyl-baidupush.php Passed 13 tests

"[凹凸曼]百度推送百度收录SEO" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
实现文章内容推送到百度里,让百度第一时间抓取你的内容

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
Everything looks great! No dangerous files found in this plugin482 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14112150479
JavaScript1203

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/baidu.png3.28KB1.98KB▼ 39.47%