68% apoyl-weixin

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

WordPress plugin [凹凸曼]一键微信登录 scored68%from 54 tests.

About plugin

  • Plugin page: apoyl-weixin
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Oct 15, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 10
  • Update frequency: every 40.4 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,173 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.09ms] Passed 4 tests

Analyzing server-side resources used by [凹凸曼]一键微信登录
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.22 ▼5.17
Dashboard /wp-admin3.38 ▲0.0748.48 ▼2.52
Posts /wp-admin/edit.php3.49 ▲0.1349.46 ▲0.73
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.60 ▼1.39
Media Library /wp-admin/upload.php3.30 ▲0.0734.47 ▲1.85
settings /wp-admin/options-general.php?page=apoyl-weixin-settings3.2835.74

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 35 new files
Database: 1 new table, 8 new options
New tables
wp_apoyl_weixin
New WordPress options
apoyl-weixin-settings
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
apoyl_weixin_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for [凹凸曼]一键微信登录
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲1114.70 ▲0.371.66 ▼0.3939.12 ▼4.18
Dashboard /wp-admin2,196 ▲165.62 ▼0.0091.15 ▼2.6440.42 ▼4.50
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0238.62 ▲0.3633.45 ▼0.50
Add New Post /wp-admin/post-new.php1,529 ▼623.16 ▲0.09657.18 ▼11.6651.17 ▼6.58
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.01108.14 ▲6.8347.65 ▲2.15
settings /wp-admin/options-general.php?page=apoyl-weixin-settings9392.1224.3226.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_apoyl_weixin
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • apoyl_weixin_db_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=apoyl-weixin-settings
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(APOYL_WEIXIN_DIRadmin/partials/nav.php): failed to open stream: No such file or directory in wp-content/plugins/apoyl-weixin/admin/partials/list.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/apoyl-weixin/public/partials/public-display.php:12
    • > PHP Warning
      Use of undefined constant APOYL_WEIXIN_DIR - assumed 'APOYL_WEIXIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/apoyl-weixin/admin/partials/list.php on line 13
    • > PHP Fatal error
      require_once(): Failed opening required 'APOYL_WEIXIN_DIRadmin/partials/nav.php' (include_path='.:/usr/share/php') in wp-content/plugins/apoyl-weixin/admin/partials/list.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/apoyl-weixin/admin/partials/nav.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-weixin/admin/partials/setting.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: oauth2, wechat, weixin

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

"[凹凸曼]一键微信登录" version 1.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
127 characters long description:
实现微信一键登录,让用户不在繁琐去注册用户,一键实现微信登录,极大的方便用户登录网站.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected564 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP16137169561
JavaScript1203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants450.00%
▷ Class constants450.00%
▷ Public constants4100.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
11 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icon32_appwx_logo.png1.79KB0.86KB▼ 51.88%
public/img/icon32_wx_logo.png2.36KB1.44KB▼ 39.24%
public/img/icon16_wx_logo.png1.50KB0.55KB▼ 63.18%
public/img/icon64_wx_logo.png4.16KB2.02KB▼ 51.35%
public/img/icon48_wx_button.png5.22KB2.11KB▼ 59.63%