10% 5usujian-bottom-pop

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

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

About plugin

  • Plugin page: 5usujian-bottom-pop
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2019
  • Latest release: May 25, 2023
  • Number of updates: 10
  • Update frequency: every 135.8 days
  • Top authors: weitamingting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,232 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
  • This plugin did not install gracefully
    • > 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.14MB] [CPU: ▼2.30ms] Passed 4 tests

This is a short check of server-side resources used by 拖放式弹窗表单提交在线支付文件上传合同签字5usujian bottom pop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.02 ▲4.26
Dashboard /wp-admin3.44 ▲0.1447.12 ▼1.67
Posts /wp-admin/edit.php3.56 ▲0.2047.33 ▼1.08
Add New Post /wp-admin/post-new.php6.04 ▲0.1684.11 ▼8.82
Media Library /wp-admin/upload.php3.37 ▲0.1437.63 ▲2.39
底部弹窗设置 /wp-admin/admin.php?page=wysj_btpop_setting3.3837.16
客户咨询列表 /wp-admin/admin.php?page=wysj_btpop_list3.3334.19

Server storage [IO: ▲0.96MB] [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: 38 new files
Database: 1 new table, 7 new options
New tables
wp_wysj_btpop_list
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
wysj_bt_pop_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for 拖放式弹窗表单提交在线支付文件上传合同签字5usujian bottom pop
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,234 ▲48813.90 ▼0.489.51 ▲7.7576.73 ▲35.50
Dashboard /wp-admin2,261 ▲765.14 ▼0.73101.08 ▼6.5047.29 ▲6.24
Posts /wp-admin/edit.php2,127 ▲382.39 ▲0.3844.39 ▲7.8642.40 ▲8.42
Add New Post /wp-admin/post-new.php1,562 ▲2822.22 ▼0.89668.31 ▲59.3437.92 ▼17.64
Media Library /wp-admin/upload.php1,437 ▲524.53 ▲0.2699.37 ▼1.1048.65 ▲2.91
底部弹窗设置 /wp-admin/admin.php?page=wysj_btpop_setting2,3423.7770.09146.21
客户咨询列表 /wp-admin/admin.php?page=wysj_btpop_list9342.0329.9244.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_wysj_btpop_list
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • wysj_bt_pop_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 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 errors when accessed directly with GET requests:
    • > 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
      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
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/5usujian-bottom-pop/wysj-front/wysj-front.php:17
    • > 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

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please add at least on tag
  • Requires php: Invalid version format
The official readme.txt is a good inspiration

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

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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,528 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP1466531,574
JavaScript3811363
CSS31880361
SVG33806230

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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

PNG files should be compressed to save space and minimize bandwidth usage
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/dragable.png0.54KB0.43KB▼ 21.30%
asset/images/wysj-logo.png5.71KB2.50KB▼ 56.13%
asset/images/close.png3.65KB1.40KB▼ 61.69%
asset/images/m-top-img.png96.03KB26.77KB▼ 72.12%
asset/images/top-img.png107.12KB31.41KB▼ 70.68%