10% wp-cdn-yes

Code Review | WP-CDN-Yes - WordPress CDN 插件

WordPress plugin WP-CDN-Yes - WordPress CDN 插件 scored10%from 54 tests.

About plugin

  • Plugin page: wp-cdn-yes
  • Plugin version: 2.2.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2021
  • Latest release: Oct 1, 2022
  • Number of updates: 13
  • Update frequency: every 48.8 days
  • Top authors: haozi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /5,239 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/wp-cdn-yes/inc/helper.php+17
    syntax error, unexpected '|', expecting '{'

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

An overview of server-side resources used by WP-CDN-Yes - WordPress CDN 插件
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.83 ▼4.24
Dashboard /wp-admin3.31 ▲0.0044.68 ▼2.64
Posts /wp-admin/edit.php3.36 ▲0.0049.50 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.94 ▼13.22
Media Library /wp-admin/upload.php3.23 ▲0.0038.04 ▲3.56

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-CDN-Yes - WordPress CDN 插件
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▼0.081.66 ▼0.0636.89 ▼3.50
Dashboard /wp-admin2,198 ▲215.63 ▼0.0492.06 ▲4.0640.20 ▼1.69
Posts /wp-admin/edit.php2,100 ▲31.98 ▲0.0340.04 ▲3.9835.70 ▲2.20
Add New Post /wp-admin/post-new.php1,526 ▼222.89 ▼0.23671.90 ▼32.0452.01 ▼3.43
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0394.35 ▼5.4640.04 ▼6.43

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected 'static' (T_STATIC) in wp-content/plugins/wp-cdn-yes/inc/class-setting.php on line 68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WePublish\\Autoload\\trailingslashit() in wp-content/plugins/wp-cdn-yes/vendor/wepublish/autoload/class-autoloader.php:50
    • > PHP Parse error
      syntax error, unexpected '|', expecting '{' in wp-content/plugins/wp-cdn-yes/inc/helper.php on line 17

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: content distribution network, content delivery network, china, optimization, cdn

wp-cdn-yes/wp-cdn-yes.php Passed 13 tests

The entry point to "WP-CDN-Yes - WordPress CDN 插件" version 2.2.0 is a PHP file that has certain tags in its header comment area
35 characters long description:
WordPress CDN 多合一优化插件

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected567 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6168274567

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected