74% apoyl-aliyunoss

Code Review | [凹凸曼]自动同步阿里云对象存储OSS

WordPress plugin [凹凸曼]自动同步阿里云对象存储OSS scored74%from 54 tests.

About plugin

  • Plugin page: apoyl-aliyunoss
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Oct 13, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 11
  • Update frequency: every 36.9 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /383 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.49ms] Passed 4 tests

Analyzing server-side resources used by [凹凸曼]自动同步阿里云对象存储OSS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.84 ▼4.31
Dashboard /wp-admin3.32 ▲0.0145.30 ▼7.25
Posts /wp-admin/edit.php3.37 ▲0.0145.16 ▼5.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.42 ▼1.08
Media Library /wp-admin/upload.php3.24 ▲0.0133.43 ▲0.31
settings /wp-admin/options-general.php?page=apoyl-aliyunoss-settings3.2832.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 128 new files
Database: 1 new table, 8 new options
New tables
wp_apoyl_aliyunoss
New WordPress options
apoyl-aliyunoss-settings
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
apoyl_aliyunoss_db_version
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for [凹凸曼]自动同步阿里云对象存储OSS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.58 ▲0.231.81 ▲0.2140.18 ▼4.76
Dashboard /wp-admin2,199 ▲255.62 ▼0.0493.98 ▼7.3938.94 ▼3.63
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0839.63 ▼3.3232.53 ▼2.79
Add New Post /wp-admin/post-new.php1,529 ▲323.01 ▼0.38617.02 ▲3.0954.18 ▲1.96
Media Library /wp-admin/upload.php1,407 ▲74.19 ▲0.0296.64 ▼8.8441.11 ▼0.36
settings /wp-admin/options-general.php?page=apoyl-aliyunoss-settings1,0922.0324.6024.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_apoyl_aliyunoss
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • apoyl_aliyunoss_db_version
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 75× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'OSS\\Result\\Result' not found in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/src/OSS/Result/DeleteObjectsResult.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'OSS\\Model\\XmlConfig' not found in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/src/OSS/Model/GetLiveChannelHistory.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'OSS\\Result\\Result' not found in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/src/OSS/Result/AclResult.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-aliyunoss/admin/partials/synsetting.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'OSS\\Model\\XmlConfig' not found in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/src/OSS/Model/ServerSideEncryptionConfig.php:14
    • > PHP Fatal error
      require(): Failed opening required 'APOYL_ALIYUNOSS_DIRapi/aliyun-oss-php-sdk-2.6.0/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/apoyl-aliyunoss/api/ApoylAliyunossCom.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'OSS\\Result\\Result' not found in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/src/OSS/Result/PutSetDeleteResult.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'OSS\\Result\\Result' not found in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/src/OSS/Result/ListPartsResult.php:13
    • > PHP Warning
      require_once(wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/index.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'OSS\\Result\\Result' not found in wp-content/plugins/apoyl-aliyunoss/api/aliyun-oss-php-sdk-2.6.0/src/OSS/Result/GetBucketCnameTokenResult.php:7

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 93% from 29 tests

readme.txt 94% 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
These attributes need your attention: The official readme.txt might help

apoyl-aliyunoss/apoyl-aliyunoss.php 92% from 13 tests

Analyzing the main PHP file in "[凹凸曼]自动同步阿里云对象存储OSS" version 1.6.0
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 254 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin7,425 lines of code in 122 files:
LanguageFilesBlank linesComment linesLines of code
PHP1151,2523,9087,154
Markdown3990221
JSON10024
YAML20023
JavaScript1203

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 complexity7.64
▷ Minimum class complexity1.00
▷ Maximum class complexity242.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces6
Interfaces2
Traits0
Classes105
▷ Abstract classes10.95%
▷ Concrete classes10499.05%
▷ Final classes00.00%
Methods617
▷ Static methods294.70%
▷ Public methods52484.93%
▷ Protected methods518.27%
▷ Private methods426.81%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants42.74%
▷ Class constants14297.26%
▷ Public constants142100.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
There are no PNG files in this plugin