10% yunshangdian

Code Review | 新浪云商店打包插件

WordPress plugin 新浪云商店打包插件 scored10%from 54 tests.

About plugin

  • Plugin page: yunshangdian
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2012
  • Latest release: Feb 20, 2013
  • Number of updates: 7
  • Update frequency: every 22.0 days
  • Top authors: luofei614 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /829 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/yunshangdian/yunshangdian.php+28
    Undefined variable: wpdb

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.22ms] Passed 4 tests

This is a short check of server-side resources used by 新浪云商店打包插件
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.91 ▼0.69
Dashboard /wp-admin3.34 ▲0.0345.66 ▼0.11
Posts /wp-admin/edit.php3.39 ▲0.0347.62 ▼1.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.80 ▼5.50
Media Library /wp-admin/upload.php3.26 ▲0.0334.73 ▼0.92
云商店打包 /wp-admin/tools.php?page=yunshangdian3.2028.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for 新浪云商店打包插件
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.401.64 ▼0.1039.79 ▼2.55
Dashboard /wp-admin2,213 ▲254.82 ▼1.08104.41 ▼5.3946.03 ▲2.38
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0438.54 ▼1.5439.12 ▲2.51
Add New Post /wp-admin/post-new.php1,517 ▼1217.47 ▼0.94647.28 ▲46.2959.37 ▲9.56
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0596.26 ▲1.7644.88 ▲0.51
云商店打包 /wp-admin/tools.php?page=yunshangdian8442.0324.1954.10

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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/yunshangdian/yunshangdian.php+117
    Undefined index: page
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% 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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=yunshangdian
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=yunshangdian
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 42× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SAE_SECRETKEY - assumed 'SAE_SECRETKEY' (this will throw an Error in a future version of PHP) in wp-content/plugins/yunshangdian/install/wp-config.php on line 51
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-pclzip.php' (include_path='.:/usr/share/php') in wp-content/plugins/yunshangdian/ZipArchive.class.php on line 2
    • > PHP Warning
      Use of undefined constant SAE_ACCESSKEY - assumed 'SAE_ACCESSKEY' (this will throw an Error in a future version of PHP) in wp-content/plugins/yunshangdian/install/wp-config.php on line 46
    • > PHP Warning
      Use of undefined constant SAE_SECRETKEY - assumed 'SAE_SECRETKEY' (this will throw an Error in a future version of PHP) in wp-content/plugins/yunshangdian/install/wp-config.php on line 47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yunshangdian/yunshangdian.php:224
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/yunshangdian/install/wp-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/yunshangdian/install/wp-config.php on line 87
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/yunshangdian/install/upgrade.php on line 12
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/yunshangdian/yunshangdian.php on line 28
    • > PHP Warning
      Use of undefined constant SAE_ACCESSKEY - assumed 'SAE_ACCESSKEY' (this will throw an Error in a future version of PHP) in wp-content/plugins/yunshangdian/install/wp-config.php on line 49
    • > PHP Warning
      Use of undefined constant SAE_ACCESSKEY - assumed 'SAE_ACCESSKEY' (this will throw an Error in a future version of PHP) in wp-content/plugins/yunshangdian/install/wp-config.php on line 44

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Screenshots: Screenshot #1 (后台样式) image missing
  • Tags: No valid plugin tags found
The official readme.txt is a good inspiration

yunshangdian/yunshangdian.php Passed 13 tests

The primary PHP file in "新浪云商店打包插件" version 1.1 is used by WordPress to initiate all plugin functionality
54 characters long description:
可以将wordpress导出为新浪云商店的应用。

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
Good job! No executable or dangerous file extensions detected2,197 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54207412,167
XML10030

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions63
▷ Named functions63100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants1995.00%
▷ Class constants15.00%
▷ Public constants1100.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 files were detected