10% bcs-support

Code Review | 百度云附件 BCS-Support

WordPress plugin 百度云附件 BCS-Support scored 10% from 54 tests.

About plugin

  • Plugin page: bcs-support
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-3.6
  • WordPress version: 6.3.1
  • First release: Mar 29, 2013
  • Latest release: Sep 6, 2013
  • Number of updates: 14
  • Update frequency: every 11.6 days
  • Top authors: Gimhoy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 11,981 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+46
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.58ms] Passed 4 tests

Server-side resources used by 百度云附件 BCS-Support
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.24 ▼34.81
Dashboard /wp-admin2.05 ▼1.265.28 ▼41.04
Posts /wp-admin/edit.php2.05 ▼1.316.34 ▼39.32
Add New Post /wp-admin/post-new.php2.05 ▼3.845.29 ▼87.14
Media Library /wp-admin/upload.php2.05 ▼1.185.64 ▼30.61
BCS Setting /wp-admin/options-general.php?page=bcs-support/bcs-support.php2.057.28

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
bcs_options
db_upgraded

Browser metrics Passed 4 tests

百度云附件 BCS-Support: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7813.28 ▼1.151.52 ▼0.1945.80 ▼5.33
Dashboard /wp-admin2,216 ▲285.84 ▲0.93102.65 ▼5.3052.48 ▲12.98
Posts /wp-admin/edit.php2,105 ▲132.05 ▲0.0138.98 ▲4.8346.46 ▲15.07
Add New Post /wp-admin/post-new.php1,545 ▲1223.45 ▲0.57660.21 ▲16.5466.27 ▲10.90
Media Library /wp-admin/upload.php1,401 ▲134.25 ▲0.03103.97 ▲3.7756.00 ▲11.34
BCS Setting /wp-admin/options-general.php?page=bcs-support/bcs-support.php9272.1427.7590.60

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
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • bcs_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+261
    Undefined index: bucket
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+264
    Undefined index: ak
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+267
    Undefined index: sk
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+270
    Undefined index: referer
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+273
    Undefined index: referer2
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+276
    Undefined index: is_Enabled_asl
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Notice in wp-content/plugins/bcs-support/bcs-support.php+279
    Undefined index: hiPath

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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_basename() in wp-content/plugins/bcs-support/bcs-support.php:18
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bcs-support/bcs-support.php on line 16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=bcs-support/bcs-support.php
    • > Network (severe)
    http://archives.gimhoy.cn/archives/alipay_donate.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (BCS Setting)
Please take inspiration from this readme.txt

bcs-support/bcs-support.php Passed 13 tests

Analyzing the main PHP file in "百度云附件 BCS-Support" version 1.2.3
25 characters long description:
This is a plugin for bcs.

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
No dangerous file extensions were detected1,694 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51298401,686
Markdown1708

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity46.50
▷ Minimum class complexity1.00
▷ Maximum class complexity191.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods74
▷ Static methods810.81%
▷ Public methods6385.14%
▷ Protected methods00.00%
▷ Private methods1114.86%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants43
▷ Global constants716.28%
▷ Class constants3683.72%
▷ Public constants36100.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