78% qqworld-cloud-storage

Code Review | QQWorld云存储

WordPress plugin QQWorld云存储 scored 78% from 54 tests.

About plugin

  • Plugin page: qqworld-cloud-sto...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 6.3.1
  • First release: Jun 7, 2019
  • Latest release: Jan 3, 2021
  • Number of updates: 11
  • Update frequency: every 52.5 days
  • Top authors: qqworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,078 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.23ms] Passed 4 tests

This is a short check of server-side resources used by QQWorld云存储
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.73 ▼10.81
Dashboard /wp-admin3.33 ▲0.0343.24 ▼2.46
Posts /wp-admin/edit.php3.38 ▲0.0344.15 ▼5.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.02 ▲6.85
Media Library /wp-admin/upload.php3.25 ▲0.0336.21 ▲1.53
QQWorld Cloud Storage /wp-admin/options-general.php?page=qqworld-cloud-storage3.5829.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

QQWorld云存储: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.481.59 ▼0.6538.34 ▼6.70
Dashboard /wp-admin2,210 ▲225.83 ▲0.02102.39 ▼10.3936.06 ▼6.64
Posts /wp-admin/edit.php2,093 ▲41.96 ▼0.0239.09 ▼1.1634.24 ▼2.85
Add New Post /wp-admin/post-new.php1,545 ▲2518.30 ▼4.72614.64 ▲10.1556.62 ▲9.83
Media Library /wp-admin/upload.php1,392 ▲74.26 ▲0.0294.01 ▼7.7942.11 ▼1.90
QQWorld Cloud Storage /wp-admin/options-general.php?page=qqworld-cloud-storage3,42116.41515.8631.00

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/qqworld-cloud-storage/settings.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/qqworld-cloud-storage/qqworld-cloud-storage.php:12
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 214
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 211
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 193
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 202
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/qqworld-cloud-storage/settings.php:221
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 208
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 199
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 205
    • > PHP Warning
      Use of undefined constant QQWORLD_CLOUD_STORAGE_URL - assumed 'QQWORLD_CLOUD_STORAGE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-cloud-storage/settings.php on line 190

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: auto, cloud storage

qqworld-cloud-storage/qqworld-cloud-storage.php 92% from 13 tests

"QQWorld云存储" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,386 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PO File37321,0531,872
PHP23448916
SVG1000464
CSS180125
JavaScript1009

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 compressed PNG files occupy 0.21MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/qrcode/wechat-follow.png36.72KB35.83KB▼ 2.42%
images/banner-772x250.png64.94KB63.69KB▼ 1.92%
images/qrcode/weibo-follow.png24.80KB23.89KB▼ 3.66%
images/wechat-qrcode.png30.54KB29.82KB▼ 2.37%
images/qrcode/qq-follow.png41.34KB40.42KB▼ 2.22%