84% wpupyun

Code Review | WPUPYUN又拍云云存储

WordPress plugin WPUPYUN又拍云云存储 scored 84% from 54 tests.

About plugin

  • Plugin page: wpupyun
  • Plugin version: 3.9.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 1, 2019
  • Latest release: May 13, 2023
  • Number of updates: 18
  • Update frequency: every 76.7 days
  • Top authors: laobuluo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 8,469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.35MB] [CPU: ▼4.91ms] Passed 4 tests

Server-side resources used by WPUPYUN又拍云云存储
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3738.33 ▼2.65
Dashboard /wp-admin3.70 ▲0.3946.52 ▼0.61
Posts /wp-admin/edit.php3.75 ▲0.3947.12 ▼3.27
Add New Post /wp-admin/post-new.php6.21 ▲0.3385.95 ▼13.12
Media Library /wp-admin/upload.php3.56 ▲0.3338.64 ▲4.52
又拍云存储设置 /wp-admin/options-general.php?page=wpupyun/actions.php3.5231.94

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 162 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
wpupyun_options
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WPUPYUN又拍云云存储
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼0.951.55 ▼0.1038.24 ▼2.98
Dashboard /wp-admin2,210 ▲285.90 ▼0.0097.07 ▼2.9144.12 ▼4.13
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0033.50 ▼8.7237.97 ▲1.90
Add New Post /wp-admin/post-new.php1,537 ▲2323.15 ▲5.66667.11 ▲25.5552.18 ▼5.53
Media Library /wp-admin/upload.php1,389 ▲14.18 ▼0.0596.64 ▼3.6945.57 ▲1.00
又拍云存储设置 /wp-admin/options-general.php?page=wpupyun/actions.php1,2661.8341.24147.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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)
Even though everything seems fine, this is not 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
  • 46× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/promises/src/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/psr7/src/BufferStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/psr7/src/InflateStream.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/promises/src/AggregateException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/wpupyun/sdk/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/wpupyun/sdk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: wordpress

wpupyun/index.php 85% from 13 tests

The entry point to "WPUPYUN又拍云云存储" version 3.9.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpupyun.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 151 characters long)

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
There were no executable files found in this plugin13,655 lines of code in 138 files:
LanguageFilesBlank linesComment linesLines of code
PHP1041,8295,1869,469
Markdown121,19603,493
JSON600427
SVG13563195
XML10025
YAML11022
JavaScript6059
make1409
CSS6046

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.61
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces10
Interfaces14
Traits2
Classes73
▷ Abstract classes00.00%
▷ Concrete classes73100.00%
▷ Final classes79.59%
Methods686
▷ Static methods7210.50%
▷ Public methods57483.67%
▷ Protected methods40.58%
▷ Private methods10815.74%
Functions162
▷ Named functions7445.68%
▷ Anonymous functions8854.32%
Constants62
▷ Global constants46.45%
▷ Class constants5893.55%
▷ Public constants58100.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
6 PNG files occupy 0.44MB with 0.34MB 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%
layui/images/footer_logo.png24.87KB0.95KB▼ 96.18%
screenshot-1.png307.89KB53.76KB▼ 82.54%
layui/css/modules/layer/default/icon-ext.png5.77KB2.91KB▼ 49.62%
layui/images/logo.png24.44KB0.95KB▼ 96.10%