84% qqworld-checkout-lite

Code Review | QQWorld收银台 初级版 / QQWorld Checkout Lite

WordPress plugin QQWorld收银台 初级版 / QQWorld Checkout Lite scored 84% from 54 tests.

About plugin

  • Plugin page: qqworld-checkout-...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.5.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Oct 10, 2020
  • Number of updates: 15
  • Update frequency: every 109.9 days
  • Top authors: qqworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.66ms] Passed 4 tests

Analyzing server-side resources used by QQWorld收银台 初级版 / QQWorld Checkout Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.89 ▼8.63
Dashboard /wp-admin3.32 ▲0.0246.09 ▼0.96
Posts /wp-admin/edit.php3.38 ▲0.0247.07 ▼0.04
Add New Post /wp-admin/post-new.php5.90 ▲0.02101.01 ▲8.76
Media Library /wp-admin/upload.php3.25 ▲0.0235.68 ▼0.99

Server storage [IO: ▲0.35MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for QQWorld收银台 初级版 / QQWorld Checkout Lite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.40 ▲0.041.79 ▼0.8343.34 ▲0.91
Dashboard /wp-admin2,227 ▲395.88 ▼0.03107.61 ▲4.7441.22 ▼1.57
Posts /wp-admin/edit.php2,110 ▲182.06 ▲0.0639.74 ▼0.8135.32 ▼0.07
Add New Post /wp-admin/post-new.php1,538 ▲518.41 ▼4.72594.42 ▼3.0556.32 ▲3.22
Media Library /wp-admin/upload.php1,406 ▲214.20 ▼0.0195.99 ▼4.7941.12 ▼4.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-checkout-lite/lib/wepay/WxPay.Config.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WxPayNotify' not found in wp-content/plugins/qqworld-checkout-lite/lib/wepay/class.NotifyCallBack.php:2
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-checkout-lite/lib/wepay/WxPay.Config.php on line 6
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-checkout-lite/lib/wepay/WxPay.Config.php on line 5
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-checkout-lite/lib/wepay/WxPay.Config.php on line 5
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-checkout-lite/lib/wepay/WxPay.Config.php on line 5
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/qqworld-checkout-lite/lib/wepay/WxPay.Config.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function qqworld_checkout\\plugin_dir_url() in wp-content/plugins/qqworld-checkout-lite/qqworld-checkout-lite.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WxPayNotifyReply' not found in wp-content/plugins/qqworld-checkout-lite/lib/wepay/WxPay.Notify.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

qqworld-checkout-lite/qqworld-checkout-lite.php 92% from 13 tests

Analyzing the main PHP file in "QQWorld收银台 初级版 / QQWorld Checkout Lite" version 1.1.2
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,318 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP123971,8972,668
PO File2178228496
CSS120153
JavaScript1011

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.18
Average class complexity7.42
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods386
▷ Static methods194.92%
▷ Public methods37897.93%
▷ Protected methods00.00%
▷ Private methods82.07%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants1359.09%
▷ Class constants940.91%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.12MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/youzanpay/featured.png7.54KB7.46KB▼ 1.10%
images/wepay-readme.png7.00KB1.96KB▼ 72.05%
images/passpay/featured.png7.12KB7.04KB▼ 1.07%
images/alipay/featured.png7.50KB7.41KB▼ 1.26%
images/banner-772x250.png73.70KB73.86KB0.00%