10% 5usujian-bottom-pop

Code Review | 拖放式弹窗表单提交在线支付文件上传合同签字5usujian bottom pop

WordPress plugin 拖放式弹窗表单提交在线支付文件上传合同签字5usujian bottom pop scored 10% from 54 tests.

About plugin

  • Plugin page: 5usujian-bottom-pop
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 5.9.2
  • First release: Sep 6, 2019
  • Latest release: Dec 10, 2020
  • Number of updates: 8
  • Update frequency: every 57.8 days
  • Top authors: weitamingting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,636 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/5usujian-bottom-pop/5usujian-bottom-pop.php+48
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.11MB] [CPU: ▼289.11ms] Passed 4 tests

A check of server-side resources used by 拖放式弹窗表单提交在线支付文件上传合同签字5usujian bottom pop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0957.86 ▲4.85
Dashboard /wp-admin3.56 ▲0.1636.04 ▲2.63
Posts /wp-admin/edit.php3.79 ▲0.1541.42 ▼14.34
Add New Post /wp-admin/post-new.php7.03 ▲0.0697.16 ▼1,149.58
Media Library /wp-admin/upload.php3.44 ▲0.1455.27 ▲25.27
底部弹窗设置 /wp-admin/admin.php?page=wysj_btpop_setting3.4628.92
客户咨询列表 /wp-admin/admin.php?page=wysj_btpop_list3.4125.35

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: 1 new table, 1 new option
New tables
wp_wysj_btpop_list
New WordPress options
wysj_bt_pop_options

Browser metrics Passed 4 tests

Checking browser requirements for 拖放式弹窗表单提交在线支付文件上传合同签字5usujian bottom pop
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,870 ▲11616.27 ▲0.586.27 ▲0.192.37 ▼0.26
Dashboard /wp-admin2,965 ▲1046.97 ▲0.76116.48 ▼15.27174.41 ▲19.33
Posts /wp-admin/edit.php2,770 ▲823.25 ▲0.0169.20 ▲2.98171.11 ▲28.40
Add New Post /wp-admin/post-new.php1,689 ▼7117.95 ▼4.68433.48 ▲14.18158.37 ▲3.72
Media Library /wp-admin/upload.php1,764 ▲695.90 ▲0.43126.46 ▼8.34201.85 ▲16.97
底部弹窗设置 /wp-admin/admin.php?page=wysj_btpop_setting3,2575.39114.24319.06
客户咨询列表 /wp-admin/admin.php?page=wysj_btpop_list1,2133.1558.36177.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wysj_btpop_list
  • Zombie WordPress options detected upon uninstall: 1 option
    • wysj_bt_pop_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/5usujian-bottom-pop/wysj-front/captcha.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(WYSJ_POP_DIR/wysj-admin/wysj-update.php): failed to open stream: No such file or directory in wp-content/plugins/5usujian-bottom-pop/wysj-admin/wysj-core.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WYSJ_POP_DIR/wysj-admin/wysj-update.php' (include_path='.:/usr/share/php') in wp-content/plugins/5usujian-bottom-pop/wysj-admin/wysj-core.php on line 2
    • > PHP Warning
      Use of undefined constant WYSJ_POP_DIR - assumed 'WYSJ_POP_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/5usujian-bottom-pop/wysj-admin/wysj-core.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5usujian-bottom-pop/wysj-front/wysj-front.php:17

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 on the user side

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 to be fixed:
  • Tags: There were no tags found
You can look at the official readme.txt

5usujian-bottom-pop/5usujian-bottom-pop.php Passed 13 tests

Analyzing the main PHP file in "拖放式弹窗表单提交在线支付文件上传合同签字5usujian bottom pop" version 1.0.2
114 characters long description:
在网页底部显示一个优雅的悬浮层,定制化表单功能可快捷收集用户资料,预约活动等

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
Success! There were no dangerous files found in this plugin2,528 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP1466531,574
JavaScript3811363
CSS31880361
SVG33806230

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods337.50%
▷ Protected methods00.00%
▷ Private methods562.50%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/images/close.png3.65KB1.40KB▼ 61.69%
asset/images/m-top-img.png96.03KB26.77KB▼ 72.12%
asset/images/veri.png4.64KB2.39KB▼ 48.40%
asset/images/top-img.png107.12KB31.41KB▼ 70.68%
asset/images/dragable.png0.54KB0.43KB▼ 21.30%