10% vab-forms-with-chart

Code Review | Forms with chart from VAB

WordPress plugin Forms with chart from VAB scored10%from 54 tests.

About plugin

  • Plugin page: vab-forms-with-chart
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6.20 - 8.1.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.1-6.3
  • WordPress version: 6.3.1
  • First release: Apr 14, 2022
  • Latest release: Aug 2, 2023
  • Number of updates: 74
  • Update frequency: every 6.4 days
  • Top authors: vabtopic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,559 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/vab-forms-with-chart/includes/ip_address.php+3
    Undefined index: HTTP_CLIENT_IP

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.92ms] Passed 4 tests

Analyzing server-side resources used by Forms with chart from VAB
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.72 ▼37.86
Dashboard /wp-admin2.08 ▼1.227.09 ▼40.88
Posts /wp-admin/edit.php2.08 ▼1.287.56 ▼39.84
Add New Post /wp-admin/post-new.php2.08 ▼3.817.02 ▼101.11
Media Library /wp-admin/upload.php2.08 ▼1.155.67 ▼27.10
Forms with Charts /wp-admin/edit.php?post_type=vab_fwc2.085.08
Create Form /wp-admin/post-new.php?post_type=vab_fwc2.086.30
About release /wp-admin/edit.php?post_type=vab_fwc&page=vab_fwc_info2.085.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Forms with chart from VAB
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲21716.80 ▲2.455.98 ▲4.2144.41 ▲2.85
Dashboard /wp-admin2,280 ▲1027.86 ▲2.14220.51 ▲105.2141.10 ▼3.33
Posts /wp-admin/edit.php2,180 ▲836.67 ▲4.7363.31 ▲24.4634.07 ▼0.05
Add New Post /wp-admin/post-new.php6,228 ▲4,69419.11 ▲0.81812.25 ▲188.6438.34 ▼35.09
Media Library /wp-admin/upload.php1,505 ▲1058.60 ▲4.33128.71 ▲32.6145.38 ▲4.46
Forms with Charts /wp-admin/edit.php?post_type=vab_fwc1,1766.9064.1328.82
Create Form /wp-admin/post-new.php?post_type=vab_fwc2,0897.6390.1152.76
About release /wp-admin/edit.php?post_type=vab_fwc&page=vab_fwc_info9546.5956.9024.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/vab-forms-with-chart/includes/ip_address.php+3
    Undefined index: HTTP_CLIENT_IP
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=vab_fwc&page=vab_fwc_info
    • > Notice in wp-content/plugins/vab-forms-with-chart/includes/ip_address.php+3
    Undefined index: HTTP_CLIENT_IP
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=vab_fwc&page=vab_fwc_info
    • > Notice in wp-content/plugins/vab-forms-with-chart/includes/ip_address.php+4
    Undefined index: HTTP_X_FORWARDED_FOR

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vab-forms-with-chart/includes/plugin_translation.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/vab-forms-with-chart/includes/ip_address.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vab-forms-with-chart/includes/controller.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=vab_fwc&page=vab_fwc_info
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"vabfwc-form/custom-block\" is registered with an invalid category \"vabfwc_category\".
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=vab_fwc&page=vab_fwc_info
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"vabfwc-chart/custom-block\" is registered with an invalid category \"vabfwc_category\".

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

vab-forms-with-chart/vab-forms-with-chart.php 85% from 13 tests

The principal PHP file in "Forms with chart from VAB" v. 1.2.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Requires PHP: Required version number should use periods and dots only (ex. "7.0" instead of "5.6.20 - 8.1.3")

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
There were no executable files found in this plugin3,569 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP152682,799
PO File1192259368
JavaScript223277
CSS301125

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity25.50
▷ Minimum class complexity8.00
▷ Maximum class complexity63.00
Average method complexity9.91
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions4195.35%
▷ Anonymous functions24.65%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/delete.png1.34KB1.34KB0.07%