72% 1000eb

Code Review | 千易网盘(新版)

WordPress plugin 千易网盘(新版) scored72%from 54 tests.

About plugin

  • Plugin page: 1000eb
  • Plugin version: 3.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0-3.3
  • WordPress version: 6.3.1
  • First release: Dec 11, 2011
  • Latest release: Dec 17, 2011
  • Number of updates: 22
  • Update frequency: every 1.1 days
  • Top authors: waisir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.88ms] Passed 4 tests

Server-side resources used by 千易网盘(新版)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.14 ▼5.49
Dashboard /wp-admin3.33 ▼0.0243.83 ▼17.93
Posts /wp-admin/edit.php3.38 ▲0.0245.69 ▼3.72
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.20 ▼16.36
Media Library /wp-admin/upload.php3.25 ▲0.0235.49 ▲0.19
千易网盘(new) /wp-admin/options-general.php?page=ws_3721up_plugin_id3.2231.32

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 10 new options
New WordPress options
ws_3721up_api_setting_api_src
can_compress_scripts
ws_3721up_api_setting_ori
ws_3721up_file_list
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
ws_3721up_api_setting

Browser metrics Passed 4 tests

Checking browser requirements for 千易网盘(新版)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.74 ▲0.291.86 ▲0.0442.64 ▼1.57
Dashboard /wp-admin2,215 ▲274.83 ▼1.0797.65 ▼8.6241.94 ▼4.46
Posts /wp-admin/edit.php2,101 ▲122.04 ▼0.0239.37 ▲3.4639.99 ▲3.91
Add New Post /wp-admin/post-new.php1,814 ▲29422.48 ▼0.58631.74 ▼38.81102.19 ▲47.55
Media Library /wp-admin/upload.php1,400 ▲124.21 ▲0.04101.61 ▼5.3148.96 ▲2.15
千易网盘(new) /wp-admin/options-general.php?page=ws_3721up_plugin_id8292.0324.1957.77

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ws_3721up_api_setting_ori
    • widget_recent-posts
    • can_compress_scripts
    • ws_3721up_file_list
    • widget_recent-comments
    • ws_3721up_api_setting
    • ws_3721up_api_setting_api_src

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/1000eb/includes/loader.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/1000eb/templates/post.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/1000eb/templates/header.admin.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/1000eb/includes/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/1000eb/templates/admin.tpl.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/1000eb/includes/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/1000eb/templates/header.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=ws_3721up_plugin_id
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=ws_3721up_plugin_id 222:5 Uncaught SyntaxError: Unexpected token '='

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 your attention:
  • Screenshots: Add images for these screenshots: #1 (Visual Editor), #2 (Html Editor), #3 (POST PAGE)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === 1000eb === )
The official readme.txt is a good inspiration

1000eb/1000eb.php Passed 13 tests

The main PHP script in "千易网盘(新版)" version 3.3.1 is automatically included on every request by WordPress
126 characters long description:
此插件可以在新建文章的界面直接上传文件到千易网盘,获取下载页面地址.并保存在POST编辑页面

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin702 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript310956385
PHP811442275
CSS26334
XML2008

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png32.17KB11.00KB▼ 65.82%
screenshot-2.png20.96KB10.05KB▼ 52.07%
screenshot-1.png25.73KB11.75KB▼ 54.32%