84% kxxx-qiniu

Code Review | 远程抓取图片CDN加速插件

WordPress plugin 远程抓取图片CDN加速插件 scored84%from 54 tests.

About plugin

  • Plugin page: kxxx-qiniu
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Feb 10, 2018
  • Latest release: May 29, 2018
  • Number of updates: 3
  • Update frequency: every 36.3 days
  • Top authors: kang211 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,144 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.43ms] Passed 4 tests

Analyzing server-side resources used by 远程抓取图片CDN加速插件
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.30 ▼2.07
Dashboard /wp-admin3.37 ▲0.0351.29 ▼13.54
Posts /wp-admin/edit.php3.48 ▲0.1353.66 ▼0.34
Add New Post /wp-admin/post-new.php5.95 ▲0.07100.45 ▼4.70
Media Library /wp-admin/upload.php3.29 ▲0.0736.60 ▼1.41

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for 远程抓取图片CDN加速插件
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.27 ▼1.481.55 ▼0.0839.05 ▼2.77
Dashboard /wp-admin2,216 ▲345.85 ▼0.0399.45 ▼10.0848.74 ▲6.32
Posts /wp-admin/edit.php2,108 ▲161.99 ▼0.0542.53 ▲5.5941.66 ▲5.15
Add New Post /wp-admin/post-new.php1,546 ▲2723.09 ▼0.00625.45 ▼8.5846.63 ▼17.75
Media Library /wp-admin/upload.php1,407 ▲194.22 ▲0.0897.85 ▼10.4653.12 ▲7.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Kxxx\\Admin\\is_admin() in wp-content/plugins/kxxx-qiniu/admin-options.php:108
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Kxxx\\Admin\\is_admin() in wp-content/plugins/kxxx-qiniu/admin-options.php:108

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (七牛云存储 扩展插件)
Please take inspiration from this readme.txt

kxxx-qiniu/kxxx-qiniu.php 92% from 13 tests

The primary PHP file in "远程抓取图片CDN加速插件" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 228 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin244 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP37737227
Markdown115017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.50
▷ Minimum class complexity9.00
▷ Maximum class complexity32.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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