84% qqworld-passport

Code Review | QQWorld通行证 / QQWorld Passport

WordPress plugin QQWorld通行证 / QQWorld Passport scored84%from 54 tests.

About plugin

  • Plugin page: qqworld-passport
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Apr 5, 2016
  • Latest release: Oct 10, 2020
  • Number of updates: 51
  • Update frequency: every 32.3 days
  • Top authors: qqworld (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /9,804 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.92MB] [CPU: ▲5.60ms] Passed 4 tests

Analyzing server-side resources used by QQWorld通行证 / QQWorld Passport
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9260.80 ▲23.87
Dashboard /wp-admin4.23 ▲0.9257.75 ▲11.48
Posts /wp-admin/edit.php4.28 ▲0.9256.81 ▲7.36
Add New Post /wp-admin/post-new.php6.83 ▲0.9492.60 ▼7.59
Media Library /wp-admin/upload.php4.15 ▲0.9245.07 ▲11.16

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for QQWorld通行证 / QQWorld Passport
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.21 ▼1.102.20 ▲0.3742.48 ▲3.02
Dashboard /wp-admin2,224 ▲365.97 ▲1.0499.29 ▼14.2541.02 ▼3.26
Posts /wp-admin/edit.php2,110 ▲242.03 ▲0.0237.20 ▼3.2932.45 ▼3.75
Add New Post /wp-admin/post-new.php1,531 ▼223.42 ▲0.20655.27 ▲9.5957.89 ▲2.49
Media Library /wp-admin/upload.php1,409 ▲214.23 ▼0.0196.27 ▼2.9642.95 ▼0.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'qqworld_passport\\core' not found in wp-content/plugins/qqworld-passport/modules/facebook/init.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'qqworld_passport\\core' not found in wp-content/plugins/qqworld-passport/modules/qq/init.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function qqworld_passport\\plugin_dir_url() in wp-content/plugins/qqworld-passport/qqworld-passport.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'qqworld_passport\\core' not found in wp-content/plugins/qqworld-passport/modules/google/init.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'qqworld_passport\\core' not found in wp-content/plugins/qqworld-passport/modules/taobao/init.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'qqworld_passport\\core' not found in wp-content/plugins/qqworld-passport/modules/weibo/init.php:6
    • > PHP Warning
      include_once(QQWORLD_PASSPORT_DIRlib/wechat/weixin.sdk.phar): failed to open stream: No such file or directory in wp-content/plugins/qqworld-passport/modules/wechat/init.php on line 36
    • > PHP Fatal error
      Uncaught Error: Class 'qqworld_passport\\core' not found in wp-content/plugins/qqworld-passport/modules/line/init.php:6
    • > PHP Warning
      include_once(): Failed opening 'QQWORLD_PASSPORT_DIRlib/wechat/weixin.sdk.phar' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/qqworld-passport/modules/wechat/init.php on line 36
    • > PHP Fatal error
      Uncaught Error: Class 'qqworld_passport\\core' not found in wp-content/plugins/qqworld-passport/modules/xiaomi/init.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

qqworld-passport/qqworld-passport.php Passed 13 tests

The principal PHP file in "QQWorld通行证 / QQWorld Passport" v. 1.2.1 is loaded by WordPress automatically on each request
62 characters long description:
QQWorld Passport for Wordpress, Many Oauth 2.0 log in methods.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected6,055 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP173796063,685
PO File37201,4281,839
CSS1121444
JavaScript111887

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity24.38
▷ Minimum class complexity3.00
▷ Maximum class complexity48.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods166
▷ Static methods74.22%
▷ Public methods166100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
26 PNG files occupy 0.35MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/douban.png2.46KB1.57KB▼ 36.28%
images/synchronizer/wechat/plus.png7.79KB7.71KB▼ 1.07%
images/synchronizer/wechat/robot.png9.42KB9.48KB0.00%
images/icons/alipay.png0.81KB1.02KB0.00%
images/icons/oschina.png2.66KB1.55KB▼ 41.83%