68% apoyl-qiniukodo

Code Review | [凹凸曼]自动同步七牛云对象存储KODO

WordPress plugin [凹凸曼]自动同步七牛云对象存储KODO scored68%from 54 tests.

About plugin

  • Plugin page: apoyl-qiniukodo
  • Plugin version: 1.8.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Oct 22, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 12
  • Update frequency: every 33.1 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /621 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.39ms] Passed 4 tests

Server-side resources used by [凹凸曼]自动同步七牛云对象存储KODO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.90 ▼4.31
Dashboard /wp-admin3.36 ▲0.0145.76 ▼19.04
Posts /wp-admin/edit.php3.47 ▲0.1149.51 ▲0.98
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.06 ▼7.20
Media Library /wp-admin/upload.php3.28 ▲0.0537.09 ▲4.50
settings /wp-admin/options-general.php?page=apoyl-qiniukodo-settings3.2930.99

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 7 new options
New WordPress options
apoyl-qiniukodo-settings
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for [凹凸曼]自动同步七牛云对象存储KODO
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4314.21 ▼0.481.60 ▼0.0536.78 ▼6.97
Dashboard /wp-admin2,199 ▲195.60 ▼0.0595.93 ▲5.5841.87 ▼3.89
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0138.05 ▼0.9935.32 ▲1.92
Add New Post /wp-admin/post-new.php1,529 ▼223.88 ▲3.02667.39 ▲53.0752.54 ▼1.38
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0294.31 ▼0.7640.29 ▼2.81
settings /wp-admin/options-general.php?page=apoyl-qiniukodo-settings1,0162.0028.6527.83

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/nikic/php-parser/grammar/rebuildParsers.php
  • 1206× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\Constraint\\Constraint' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'SebastianBergmann\\CodeCoverage\\Exception' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Qiniu\\Http\\Middleware\\Middleware' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/src/Qiniu/Http/Middleware/RetryDomainsMiddleware.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\\Builder\\Declaration' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Sniffs/Namespaces/CompoundNamespaceDepthSniff.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: kodo, oss

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

The primary PHP file in "[凹凸曼]自动同步七牛云对象存储KODO" version 1.8.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 252 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/bin/php-parse.bat
      • wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
      • wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/bin/phpcbf.bat
      • wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
      • wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/bin/phpcs.bat
      • wp-content/plugins/apoyl-qiniukodo/api/php-sdk-7.10.1/vendor/bin/phpunit.bat
159,862 lines of code in 2,227 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,72531,60852,960135,777
Pascal1303,2317,1186,576
XML1542122924,615
JSON35703,526
Markdown611,71303,018
JavaScript637668742,158
yacc3336122,058
XSD4601,094
CSS3722198798
YAML4341176
reStructuredText2231831
DOS Batch641030
Bourne Shell1203
SVG2002

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 478)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.82
▷ Minimum class complexity1.00
▷ Maximum class complexity724.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity478.00
Code structure
Namespaces256
Interfaces76
Traits4
Classes1,476
▷ Abstract classes563.79%
▷ Concrete classes1,42096.21%
▷ Final classes46332.61%
Methods6,493
▷ Static methods5398.30%
▷ Public methods5,21180.26%
▷ Protected methods67110.33%
▷ Private methods6119.41%
Functions1,518
▷ Named functions25216.60%
▷ Anonymous functions1,26683.40%
Constants659
▷ Global constants12018.21%
▷ Class constants53981.79%
▷ Public constants49090.91%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin