10% scs-support

Code Review | 新浪云存储SCS-Support

WordPress plugin 新浪云存储SCS-Support scored10%from 54 tests.

About plugin

  • Plugin page: scs-support
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2014
  • Latest release: Jul 30, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: Gimhoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,440 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
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/scs-support/scs-support.php+40
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.85MB] [CPU: ▼50.03ms] Passed 4 tests

A check of server-side resources used by 新浪云存储SCS-Support
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.56 ▼32.21
Dashboard /wp-admin2.15 ▼1.155.98 ▼46.47
Posts /wp-admin/edit.php2.15 ▼1.207.36 ▼38.40
Add New Post /wp-admin/post-new.php2.15 ▼3.736.12 ▼83.02
Media Library /wp-admin/upload.php2.15 ▼1.075.03 ▼30.16
SCS Setting /wp-admin/options-general.php?page=scs-support/scs-support.php2.155.79

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

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

Browser metrics Passed 4 tests

A check of browser resources used by 新浪云存储SCS-Support
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7814.45 ▼0.231.89 ▼0.4745.88 ▼0.53
Dashboard /wp-admin2,219 ▲344.86 ▼0.96109.27 ▲5.6554.27 ▲14.74
Posts /wp-admin/edit.php2,102 ▲162.04 ▲0.0439.96 ▲3.4847.22 ▲15.31
Add New Post /wp-admin/post-new.php1,554 ▲3423.37 ▲0.41591.70 ▼85.2955.71 ▲3.18
Media Library /wp-admin/upload.php1,401 ▲104.26 ▲0.0598.71 ▼8.1550.44 ▲3.04
SCS Setting /wp-admin/options-general.php?page=scs-support/scs-support.php8902.1428.3972.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • scs_options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=scs-support/scs-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=scs-support/scs-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=scs-support/scs-support.php
    • > Notice in wp-content/plugins/scs-support/scs-support.php+193
    Undefined index: bucket
    • > GET request to /wp-admin/options-general.php?page=scs-support/scs-support.php
    • > Notice in wp-content/plugins/scs-support/scs-support.php+196
    Undefined index: ak
    • > GET request to /wp-admin/options-general.php?page=scs-support/scs-support.php
    • > Notice in wp-content/plugins/scs-support/scs-support.php+199
    Undefined index: sk
    • > GET request to /wp-admin/options-general.php?page=scs-support/scs-support.php
    • > Notice in wp-content/plugins/scs-support/scs-support.php+202
    Undefined index: hiPath

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/scs-support/scs-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/scs-support/scs-support.php on line 16

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=scs-support/scs-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

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (SCS Setting) image missing
The official readme.txt is a good inspiration

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

"新浪云存储SCS-Support" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
上传附件至新浪云存储(Sina Cloud Storage)。This is a plugin for SCS.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,369 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23338321,369

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity101.67
▷ Minimum class complexity1.00
▷ Maximum class complexity223.00
Average method complexity6.39
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods56
▷ Static methods4376.79%
▷ Public methods4885.71%
▷ Protected methods00.00%
▷ Private methods814.29%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.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
No PNG images were found in this plugin