10% taiyiyun

Code Review | Taiyiyun

WordPress plugin Taiyiyun scored10%from 54 tests.

About plugin

  • Plugin page: taiyiyun
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Jan 17, 2017
  • Number of updates: 7
  • Update frequency: every 5.0 days
  • Top authors: xujunjiepk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/taiyiyun/taiyiyunlib.php+10
    The each() function is deprecated. This message will be suppressed on further calls

Server metrics [RAM: ▼1.87MB] [CPU: ▼59.95ms] Passed 4 tests

This is a short check of server-side resources used by Taiyiyun
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.347.13 ▼35.87
Dashboard /wp-admin2.15 ▼1.207.25 ▼57.24
Posts /wp-admin/edit.php2.15 ▼1.218.45 ▼41.79
Add New Post /wp-admin/post-new.php2.15 ▼3.746.17 ▼104.90
Media Library /wp-admin/upload.php2.15 ▼1.086.79 ▼28.89
区块链版权登记 /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php2.156.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
taiyiyun_token
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Taiyiyun
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.38 ▼0.233.20 ▲1.0943.16 ▲0.41
Dashboard /wp-admin2,208 ▲285.65 ▼0.0492.36 ▲0.4247.81 ▲6.29
Posts /wp-admin/edit.php2,113 ▲132.01 ▲0.0240.61 ▲0.1244.31 ▲5.70
Add New Post /wp-admin/post-new.php1,534 ▲821.47 ▼2.05680.00 ▼4.7763.83 ▲4.59
Media Library /wp-admin/upload.php1,413 ▲134.24 ▲0.0599.01 ▼6.4052.07 ▲1.91
区块链版权登记 /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php8572.1926.6460.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/taiyiyun/taiyiyun.class.php+19
    Undefined index: validated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • taiyiyun_token
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Notice in wp-content/plugins/taiyiyun/taiyiyun.class.php+19
    Undefined index: validated
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Deprecated in wp-content/plugins/taiyiyun/taiyiyunlib.php+10
    The each() function is deprecated. This message will be suppressed on further calls
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Warning in wp-content/plugins/taiyiyun/taiyiyunlib.php+10
    Variable passed to each() is not an array or object
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Notice in wp-content/plugins/taiyiyun/taiyiyunlib.php+13
    Undefined variable: arg
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Warning in wp-content/plugins/taiyiyun/taiyiyunlib.php+46
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Warning in wp-content/plugins/taiyiyun/taiyiyunlib.php+46
    file_get_contents(http://api.taiyiyun.com/copyright/?taiyiyun.api=api.common.token): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Notice in wp-content/plugins/taiyiyun/taiyiyun.class.php+28
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=taiyiyun/taiyiyun.class.php
    • > Notice in wp-content/plugins/taiyiyun/settings.php+25
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/taiyiyun/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/taiyiyun/taiyiyun.class.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (nothing) image required
  • Tags: There were no tags found
You can take inspiration from this readme.txt

taiyiyun/wp-taiyiyun.php 85% from 13 tests

The main PHP file in "Taiyiyun" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 225 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("taiyiyun.php" instead of "wp-taiyiyun.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected284 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43851284

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity16.00
▷ Minimum class complexity6.00
▷ Maximum class complexity26.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin