84% wpjam-qiniu

Code Review | 七牛镜像存储 WordPress 插件

WordPress plugin 七牛镜像存储 WordPress 插件 scored84%from 54 tests.

About plugin

  • Plugin page: wpjam-qiniu
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Aug 7, 2013
  • Latest release: May 6, 2017
  • Number of updates: 67
  • Update frequency: every 20.4 days
  • Top authors: denishua (91.04%)imhui (10.45%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /101,445 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by 七牛镜像存储 WordPress 插件
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.03 ▼4.78
Dashboard /wp-admin3.31 ▲0.0049.92 ▲0.63
Posts /wp-admin/edit.php3.36 ▲0.0047.91 ▼2.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.14 ▼1.68
Media Library /wp-admin/upload.php3.23 ▲0.0036.56 ▲1.60

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for 七牛镜像存储 WordPress 插件
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.23 ▼0.041.73 ▼0.0746.74 ▲1.34
Dashboard /wp-admin2,192 ▲125.54 ▼0.1187.85 ▲0.9739.06 ▼1.38
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0642.70 ▲5.3437.90 ▲4.62
Add New Post /wp-admin/post-new.php1,531 ▲522.93 ▼0.08662.36 ▼18.8959.48 ▼2.07
Media Library /wp-admin/upload.php1,400 ▲64.26 ▲0.0598.90 ▲0.8443.33 ▼0.18

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpjam-qiniu/wpjam-qiniutek.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpjam-qiniu/wpjam-qiniutek.php on line 14
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wpjam-qiniu/wpjam-qiniutek.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: cdn, wpjam

wpjam-qiniu/wpjam-qiniutek.php 85% from 13 tests

Analyzing the main PHP file in "七牛镜像存储 WordPress 插件" version 1.4.6
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 432 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wpjam-qiniu.php" instead of "wpjam-qiniutek.php")

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
Success! There were no dangerous files found in this plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12814

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin