67% baidushare-wp

Code Review | 百度分享按钮

WordPress plugin 百度分享按钮 scored67%from 54 tests.

About plugin

  • Plugin page: baidushare-wp
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-3.8.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2014
  • Latest release: Mar 27, 2014
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: cuckoohello (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /18,029 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.94ms] Passed 4 tests

Server-side resources used by 百度分享按钮
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.21 ▼42.71
Dashboard /wp-admin2.08 ▼1.226.95 ▼41.32
Posts /wp-admin/edit.php2.08 ▼1.275.02 ▼42.12
Add New Post /wp-admin/post-new.php2.08 ▼3.805.79 ▼93.61
Media Library /wp-admin/upload.php2.08 ▼1.145.95 ▼30.18

Server storage [IO: ▲0.34MB] [DB: ▲0.08MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
b_option
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for 百度分享按钮
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.28 ▼1.334.59 ▲2.3942.96 ▲0.12
Dashboard /wp-admin2,210 ▲225.87 ▲1.00106.58 ▼3.3744.91 ▲0.32
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0140.97 ▲4.1641.09 ▲6.73
Add New Post /wp-admin/post-new.php1,546 ▲1323.16 ▲0.16628.98 ▼19.9370.06 ▲22.12
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0495.61 ▼10.4451.15 ▲6.37
百度分享按钮 /wp-admin/baidu_share.php260.440.1017.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • b_option
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/baidushare-wp/baidu_share.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/baidu_share.php
    • > Network (severe)
    wp-admin/baidu_share.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === baidushare-wp === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (社会化数据分析后台预览), #2 (插件效果预览), #3 (插件后台配置预览)
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

baidushare-wp/baidu_share.php 85% from 13 tests

The main PHP file in "百度分享按钮" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("baidushare-wp.php" instead of "baidu_share.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 1304 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin77 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17877

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected