72% 1000eb

Code Review | 千易网盘(新版)

WordPress plugin 千易网盘(新版) scored 72% 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: 5.9.2
  • 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 / 2,730 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼294.56ms] Passed 4 tests

A check of server-side resources used by 千易网盘(新版)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0354.87 ▲4.02
Dashboard /wp-admin3.44 ▲0.0332.74 ▼0.87
Posts /wp-admin/edit.php3.67 ▲0.0339.84 ▲4.37
Add New Post /wp-admin/post-new.php6.91 ▼0.0698.54 ▼1,181.66
Media Library /wp-admin/upload.php3.32 ▲0.0224.47 ▲0.26
千易网盘(new) /wp-admin/options-general.php?page=ws_3721up_plugin_id3.2923.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 4 new options
New WordPress options
ws_3721up_api_setting
ws_3721up_file_list
ws_3721up_api_setting_api_src
ws_3721up_api_setting_ori

Browser metrics Passed 4 tests

Checking browser requirements for 千易网盘(新版)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,775 ▲2115.90 ▲0.157.11 ▲0.362.71 ▼0.02
Dashboard /wp-admin2,904 ▲466.17 ▲0.01118.67 ▼15.80169.11 ▲7.03
Posts /wp-admin/edit.php2,703 ▲93.25 ▲0.0162.74 ▼1.17148.59 ▲0.33
Add New Post /wp-admin/post-new.php1,954 ▲24325.18 ▲3.71399.23 ▼73.04248.16 ▲91.99
Media Library /wp-admin/upload.php1,707 ▲95.55 ▲0.05139.90 ▼0.43198.17 ▲12.14
千易网盘(new) /wp-admin/options-general.php?page=ws_3721up_plugin_id1,0472.6354.21189.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 4 options in the database
    • ws_3721up_api_setting_ori
    • ws_3721up_api_setting
    • ws_3721up_file_list
    • ws_3721up_api_setting_api_src

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/1000eb/includes/loader.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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.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/post.tpl.php:11
    • > 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 | A shallow check that no browser errors were triggered
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 236:5 Uncaught SyntaxError: Unexpected token '='

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
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Visual Editor), #2 (Html Editor), #3 (POST PAGE)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === 1000eb === )
You can take inspiration from this readme.txt

1000eb/1000eb.php Passed 13 tests

"千易网盘(新版)" version 3.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
126 characters long description:
此插件可以在新建文章的界面直接上传文件到千易网盘,获取下载页面地址.并保存在POST编辑页面

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
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

Cyclomatic complexity and code structure are the fingerprint of this plugin
No 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

Often times overlooked, PNG files can occupy unnecessary space in 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%