84% check-baidu-result

Code Review | Check Baidu Result

WordPress plugin Check Baidu Result scored84%from 54 tests.

About plugin

  • Plugin page: check-baidu-result
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Mar 3, 2014
  • Latest release: Mar 19, 2014
  • Number of updates: 19
  • Update frequency: every 0.9 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,832 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.13MB] [CPU: ▼7.77ms] Passed 4 tests

Analyzing server-side resources used by Check Baidu Result
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.5020.29 ▼20.42
Dashboard /wp-admin3.31 ▼0.0360.41 ▼0.48
Posts /wp-admin/edit.php3.37 ▲0.0148.63 ▲0.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.81 ▼10.56
Media Library /wp-admin/upload.php3.24 ▲0.0137.14 ▲2.04
Check Baidu Result /wp-admin/options-general.php?page=check-baidu-result-options3.2043.21

Server storage [IO: ▲0.05MB] [DB: ▲0.63MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
check_baidu_result_show_to
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
check_baidu_result_get_name

Browser metrics Passed 4 tests

This is an overview of browser requirements for Check Baidu Result
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.39 ▼0.826.43 ▲4.5241.37 ▲0.21
Dashboard /wp-admin2,213 ▲215.88 ▲0.93111.41 ▼4.5543.37 ▲2.54
Posts /wp-admin/edit.php2,090 ▼22.04 ▼0.0436.34 ▼3.0834.08 ▼0.78
Add New Post /wp-admin/post-new.php1,548 ▲618.16 ▼0.10597.78 ▼58.6076.46 ▲17.82
Media Library /wp-admin/upload.php1,392 ▲14.28 ▲0.0999.60 ▲2.6143.26 ▼1.05
Check Baidu Result /wp-admin/options-general.php?page=check-baidu-result-options8422.0531.6641.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • check_baidu_result_show_to
    • check_baidu_result_get_name
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/check-baidu-result/options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/check-baidu-result/check-baidu-result.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
3 plugin tags: baidu, seo, check

check-baidu-result/check-baidu-result.php Passed 13 tests

The main PHP file in "Check Baidu Result" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
48 characters long description:
检查你的文章是否在百度搜索结果内

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected182 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21725104
PO File2222278

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin