90% zhanzhangb-tcdn

Code Review | zhanzhangb-tcdn

WordPress plugin zhanzhangb-tcdn scored90%from 54 tests.

About plugin

  • Plugin page: zhanzhangb-tcdn
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2020
  • Latest release: May 20, 2020
  • Number of updates: 14
  • Update frequency: every 3.6 days
  • Top authors: ywtywt (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /808 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.71ms] Passed 4 tests

An overview of server-side resources used by zhanzhangb-tcdn
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.68 ▼0.55
Dashboard /wp-admin3.38 ▲0.0847.90 ▼5.36
Posts /wp-admin/edit.php3.43 ▲0.0750.67 ▲6.01
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.96 ▼6.05
Media Library /wp-admin/upload.php3.30 ▲0.0735.28 ▲1.12
站长帮 - 自动刷新腾讯云CDN设置 /wp-admin/options-general.php?page=zhanzhangb_tcdn3.2732.59

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
zhanzhangb_tcdn_activation
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for zhanzhangb-tcdn
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.19 ▼1.421.61 ▼0.1640.89 ▼3.70
Dashboard /wp-admin2,210 ▲226.06 ▲0.21106.05 ▼11.1648.05 ▲1.49
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0241.20 ▲3.2539.67 ▲5.65
Add New Post /wp-admin/post-new.php1,545 ▲918.38 ▼4.93592.57 ▼25.5248.00 ▼5.01
Media Library /wp-admin/upload.php1,386 ▼54.26 ▲0.0594.91 ▼5.6544.10 ▼0.74
站长帮 - 自动刷新腾讯云CDN设置 /wp-admin/options-general.php?page=zhanzhangb_tcdn8342.1823.5760.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: cache, cdn

zhanzhangb-tcdn/zhanzhangb-tcdn.php 92% from 13 tests

The primary PHP file in "zhanzhangb-tcdn" version 1.2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 162 characters long)

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 plugin308 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22234308

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin