10% laobuluo-baidu-submit

Code Review | 老部落百度快速提交插件

WordPress plugin 老部落百度快速提交插件 scored 10% from 54 tests.

About plugin

  • Plugin page: laobuluo-baidu-su...
  • Plugin version: 2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 5, 2020
  • Latest release: May 13, 2023
  • Number of updates: 10
  • Update frequency: every 101.8 days
  • Top authors: laobuluo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 9,153 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/laobuluo-baidu-submit/index.php+381
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▼1.79MB] [CPU: ▼53.11ms] Passed 4 tests

A check of server-side resources used by 老部落百度快速提交插件
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.275.08 ▼34.35
Dashboard /wp-admin2.21 ▼1.096.61 ▼45.74
Posts /wp-admin/edit.php2.21 ▼1.146.22 ▼42.90
Add New Post /wp-admin/post-new.php2.21 ▼3.676.57 ▼89.43
Media Library /wp-admin/upload.php2.21 ▼1.025.57 ▼29.18
百度提交插件 /wp-admin/admin.php?page=laobuluo-baidu-submit/setting2.216.45
批量提交 /wp-admin/admin.php?page=laobuluo-baidu-submit/manually_submit2.217.05

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
laobuluo_bs_options
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by 老部落百度快速提交插件
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5614.64 ▲0.001.71 ▼0.2641.87 ▼5.37
Dashboard /wp-admin2,233 ▲565.89 ▼0.02100.98 ▼0.0046.91 ▲2.50
Posts /wp-admin/edit.php2,119 ▲272.02 ▲0.0040.39 ▼1.5343.17 ▲7.72
Add New Post /wp-admin/post-new.php1,564 ▲4118.36 ▼4.66637.37 ▼20.5250.67 ▼8.59
Media Library /wp-admin/upload.php1,418 ▲274.21 ▲0.0196.02 ▼3.0948.61 ▲3.13
百度提交插件 /wp-admin/admin.php?page=laobuluo-baidu-submit/setting1,1021.8130.93121.90
批量提交 /wp-admin/admin.php?page=laobuluo-baidu-submit/manually_submit1,0331.8030.0055.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/laobuluo-baidu-submit/index.php+381
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=laobuluo-baidu-submit/manually_submit
    • > Deprecated in wp-content/plugins/laobuluo-baidu-submit/index.php+381
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=laobuluo-baidu-submit/manually_submit
    • > Warning in wp-content/plugins/laobuluo-baidu-submit/api.php+153
    file_get_contents(wp-content/plugins/laobuluo-baidu-submit/tmp/cache_check): failed to open stream: No such file or directory
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=laobuluo-baidu-submit/manually_submit
    • > Notice in wp-content/plugins/laobuluo-baidu-submit/index.php+321
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=laobuluo-baidu-submit/manually_submit
    • > Warning in wp-content/plugins/laobuluo-baidu-submit/api.php+153
    file_get_contents(wp-content/plugins/laobuluo-baidu-submit/tmp/cache_remain): failed to open stream: No such file or directory

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/laobuluo-baidu-submit/manually_submit.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/laobuluo-baidu-submit/setting_page.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please add at least on tag
Please take inspiration from this readme.txt

laobuluo-baidu-submit/index.php 85% from 13 tests

The primary PHP file in "老部落百度快速提交插件" version 2.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("laobuluo-baidu-submit.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected983 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP510452773
SVG13563195
JavaScript6059
CSS6046

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity26.00
▷ Minimum class complexity4.00
▷ Maximum class complexity89.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.39MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
layui/css/modules/layer/default/icon.png11.22KB4.36KB▼ 61.19%
screenshot-2.png67.30KB22.74KB▼ 66.20%
layui/images/footer_logo.png24.74KB0.87KB▼ 96.48%
layui/images/qrcode.png72.54KB12.37KB▼ 82.94%
layui/images/logo.png25.43KB0.87KB▼ 96.58%