74% apoyl-qq

Code Review | [凹凸曼]一键QQ登录

WordPress plugin [凹凸曼]一键QQ登录 scored74%from 54 tests.

About plugin

  • Plugin page: apoyl-qq
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 30, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 9
  • Update frequency: every 50.1 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /850 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.65ms] Passed 4 tests

An overview of server-side resources used by [凹凸曼]一键QQ登录
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0735.73 ▼3.84
Dashboard /wp-admin3.38 ▲0.0351.76 ▼13.09
Posts /wp-admin/edit.php3.49 ▲0.1350.38 ▲1.76
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.59 ▲0.56
Media Library /wp-admin/upload.php3.30 ▲0.0736.15 ▲3.07
settings /wp-admin/options-general.php?page=apoyl-qq-settings3.2832.03

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 28 new files
Database: 1 new table, 8 new options
New tables
wp_apoyl_qq
New WordPress options
can_compress_scripts
apoyl_qq_db_version
apoyl-qq-settings
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by [凹凸曼]一键QQ登录
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5114.10 ▼0.161.65 ▼0.0735.98 ▼7.16
Dashboard /wp-admin2,193 ▲185.64 ▼0.0895.04 ▼21.8442.87 ▼3.91
Posts /wp-admin/edit.php2,101 ▲11.94 ▼0.0840.31 ▲2.1237.40 ▲4.81
Add New Post /wp-admin/post-new.php1,529 ▲323.04 ▼0.20584.32 ▼10.4453.41 ▲5.70
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.0298.85 ▲4.5743.80 ▼1.03
settings /wp-admin/options-general.php?page=apoyl-qq-settings9282.1624.5428.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_apoyl_qq
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • apoyl_qq_db_version
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/apoyl-qq/admin/partials/nav.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'APOYL_QQ_DIRadmin/partials/nav.php' (include_path='.:/usr/share/php') in wp-content/plugins/apoyl-qq/admin/partials/list.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-qq/admin/partials/setting.php:23
    • > PHP Warning
      Use of undefined constant APOYL_QQ_DIR - assumed 'APOYL_QQ_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/apoyl-qq/admin/partials/list.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/apoyl-qq/public/partials/public-display.php:12
    • > PHP Warning
      require_once(APOYL_QQ_DIRadmin/partials/nav.php): failed to open stream: No such file or directory in wp-content/plugins/apoyl-qq/admin/partials/list.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: qqlogin, qq, oauth2

apoyl-qq/apoyl-qq.php Passed 13 tests

The main PHP file in "[凹凸曼]一键QQ登录" ver. 1.6.0 adds more information about the plugin and also serves as the entry point for this plugin
119 characters long description:
实现QQ一键登录,让用户不在繁琐去注册用户,一键实现QQ登录,极大的方便用户登录网站.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin579 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP16156169576
JavaScript1203

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.16
Average class complexity4.11
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods38
▷ Static methods410.53%
▷ Public methods3284.21%
▷ Protected methods00.00%
▷ Private methods615.79%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/bt_white_24X24.png0.98KB0.73KB▼ 25.40%
public/img/bt_blue_76X24.png2.17KB1.64KB▼ 24.38%
public/img/bt_blue_24X24.png0.93KB0.80KB▼ 14.12%
public/img/bt_white_76X24.png2.23KB1.53KB▼ 31.36%