10% yun-tui-jian

Code Review | 云推荐

WordPress plugin 云推荐 scored 10% from 53 tests.

About plugin

  • Plugin page: yun-tui-jian
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5
  • WordPress version: 5.8.1
  • First release: Dec 18, 2012
  • Latest release: Dec 18, 2012
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: Yun Tui Jian (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 1,794 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/yun-tui-jian/aliyunrec.guide.class.php+229
    Non-static method AliyunRec_Guide::init() should not be called statically

Server metrics [RAM: ▼1.80MB] [CPU: ▼323.34ms] Passed 4 tests

An overview of server-side resources used by 云推荐
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.83 ▼0.894.98 ▼17.42
Dashboard /wp-admin1.85 ▼1.215.62 ▼38.51
Posts /wp-admin/edit.php1.85 ▼1.265.57 ▼32.79
Add New Post /wp-admin/post-new.php1.85 ▼3.586.19 ▼1,189.51
Media Library /wp-admin/upload.php1.85 ▼1.165.62 ▼32.55
云推荐 /wp-admin/options-general.php?page=aliyunrec.guide.class.php1.855.52

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 1 new option
New WordPress options
cfg_aliyunrec_state

Browser metrics Passed 4 tests

An overview of browser requirements for 云推荐
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲10215.97 ▲0.0710.49 ▲2.5851.40 ▲3.20
Dashboard /wp-admin2,935 ▲855.89 ▲0.01134.06 ▲3.33113.50 ▲10.64
Posts /wp-admin/edit.php2,711 ▲52.69 ▲0.0064.70 ▼4.90100.88 ▲11.37
Add New Post /wp-admin/post-new.php1,856 ▼119.07 ▼0.23344.12 ▼28.37109.40 ▲1.84
Media Library /wp-admin/upload.php1,780 ▲85.00 ▲0.00148.24 ▼0.45117.34 ▲3.52
云推荐 /wp-admin/options-general.php?page=aliyunrec.guide.class.php1,0282.4056.28101.59

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/yun-tui-jian/aliyunrec.guide.class.php+229
    Non-static method AliyunRec_Guide::init() should not be called statically

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
    • > GET request to /wp-admin/options-general.php?page=aliyunrec.guide.class.php
    • > Deprecated in wp-content/plugins/yun-tui-jian/aliyunrec.guide.class.php+229
    Non-static method AliyunRec_Guide::init() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=aliyunrec.guide.class.php
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method AliyunRec_Guide::addAdminMenu() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aliyunrec.guide.class.php
    • > Deprecated in wp-content/plugins/yun-tui-jian/aliyunrec.guide.class.php+111
    Non-static method AliyunRec_Guide::getLocalLanguage() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aliyunrec.guide.class.php
    • > Deprecated in wp-content/plugins/yun-tui-jian/aliyunrec.guide.class.php+182
    Non-static method AliyunRec_Common_Proxy_Service::getLocalLanguage() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aliyunrec.guide.class.php
    • > Deprecated in wp-content/plugins/yun-tui-jian/common/aliyunrec.common.proxy.service.php+56
    Non-static method AliyunRec_Common_Config_Service::getConfig() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=aliyunrec.guide.class.php
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method AliyunRec_Guide::manageSetting() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=aliyunrec.guide.class.php
    • > Deprecated in wp-content/plugins/yun-tui-jian/aliyunrec.guide.class.php+111
    Non-static method AliyunRec_Guide::getAliyunRecState() should not be called statically

SRP 0% 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 take a closer look at the following
  • 9× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/yun-tui-jian/common/aliyunrec.common.config.service.php
    • > /wp-content/plugins/yun-tui-jian/config/common.const.php
    • > /wp-content/plugins/yun-tui-jian/common/aliyunrec.common.proxy.service.php
    • > /wp-content/plugins/yun-tui-jian/config/template.request.php
    • > /wp-content/plugins/yun-tui-jian/config/template.send.php
    • > /wp-content/plugins/yun-tui-jian/common/aliyunrec.common.general.service.php
    • > /wp-content/plugins/yun-tui-jian/config/common.application.php
    • > /wp-content/plugins/yun-tui-jian/config/common.language.php
    • > /wp-content/plugins/yun-tui-jian/config/template.option.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yun-tui-jian/aliyunrec.guide.class.php:26

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 Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: aliyun, cnzz

yun-tui-jian/aliyunrec.guide.class.php 85% from 13 tests

The main file in "云推荐" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 358 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yun-tui-jian.php" instead of "aliyunrec.guide.class.php")

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 plugin392 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1055240371
HTML10021

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity18.00
▷ Minimum class complexity3.00
▷ Maximum class complexity42.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin