74% apoyl-tencentcos

Code Review | [凹凸曼]自动同步腾讯云对象存储COS

WordPress plugin [凹凸曼]自动同步腾讯云对象存储COS scored74%from 54 tests.

About plugin

  • Plugin page: apoyl-tencentcos
  • Plugin version: 1.7.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Sep 20, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 14
  • Update frequency: every 30.7 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by [凹凸曼]自动同步腾讯云对象存储COS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.88 ▼10.12
Dashboard /wp-admin3.32 ▲0.0146.66 ▼2.87
Posts /wp-admin/edit.php3.37 ▲0.0148.59 ▼1.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.12 ▲2.66
Media Library /wp-admin/upload.php3.24 ▲0.0134.99 ▲2.48
settings /wp-admin/options-general.php?page=apoyl-tencentcos-settings3.2932.47

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 276 new files
Database: 1 new table, 8 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for [凹凸曼]自动同步腾讯云对象存储COS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.20 ▼0.511.70 ▲0.0238.92 ▼5.73
Dashboard /wp-admin2,202 ▲255.62 ▲0.0994.07 ▼9.8440.35 ▼6.91
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0139.77 ▼3.9739.95 ▼0.47
Add New Post /wp-admin/post-new.php1,532 ▼523.20 ▲0.05585.43 ▼18.1557.13 ▼1.35
Media Library /wp-admin/upload.php1,404 ▲44.16 ▼0.0299.95 ▲0.2239.90 ▼3.00
settings /wp-admin/options-general.php?page=apoyl-tencentcos-settings9592.0025.0328.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_apoyl_tencentcos
  • This plugin does not fully uninstall, leaving 7 options in the database
    • apoyl_tencentcos_db_version
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 fix the following
  • 90× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Command\\Guzzle\\RequestLocation\\AbstractLocation' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/guzzle-services/src/RequestLocation/MultiPartLocation.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/psr7/src/UploadedFile.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Command\\ServiceClientInterface' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/command/src/ServiceClient.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Command\\Guzzle\\ResponseLocation\\AbstractLocation' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/JsonLocation.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Command\\ToArrayInterface' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/guzzle-services/src/Parameter.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Command\\Guzzle\\RequestLocation\\AbstractLocation' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/guzzle-services/src/RequestLocation/XmlLocation.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/psr7/src/Request.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/apoyl-tencentcos/api/cos-sdk-v5-7/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


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
Attributes that require attention: The official readme.txt might help

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

The primary PHP file in "[凹凸曼]自动同步腾讯云对象存储COS" version 1.7.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected34,830 lines of code in 254 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.81
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
▷ Abstract classes21.34%
▷ Concrete classes14798.66%
▷ Final classes3725.17%
▷ Static methods24918.96%
▷ Public methods1,13586.44%
▷ Protected methods261.98%
▷ Private methods15211.58%
▷ Named functions5130.36%
▷ Anonymous functions11769.64%
▷ Global constants55.81%
▷ Class constants8194.19%
▷ Public constants7086.42%

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
No PNG images were found in this plugin