68% wah-forms

Code Review | WAH Forms

WordPress plugin WAH Forms scored68%from 54 tests.

About plugin

  • Plugin page: wah-forms
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 20
  • Update frequency: every 26.5 days
  • Top authors: vol4ikman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,961 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.42MB] [CPU: ▼35.85ms] Passed 4 tests

This is a short check of server-side resources used by WAH Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2041.64 ▲3.39
Dashboard /wp-admin3.58 ▲0.2326.87 ▼38.37
Posts /wp-admin/edit.php3.58 ▲0.2233.00 ▼19.27
Add New Post /wp-admin/post-new.php3.58 ▼2.3127.28 ▼73.71
Media Library /wp-admin/upload.php3.58 ▲0.3525.93 ▼12.06
WAH Forms /wp-admin/options-general.php?page=wahforms-page3.5828.45
All Items /wp-admin/edit.php?post_type=wah_forms3.5825.17
Add New WAH Form /wp-admin/post-new.php?post_type=wah_forms3.5827.66

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WAH Forms: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.71 ▼0.478.02 ▲6.0137.19 ▼5.86
Dashboard /wp-admin2,240 ▲555.86 ▲0.05103.05 ▼5.0738.11 ▼1.73
Posts /wp-admin/edit.php2,120 ▲311.97 ▼0.0937.44 ▼0.0334.23 ▼0.08
Add New Post /wp-admin/post-new.php1,559 ▲4523.32 ▲5.83650.86 ▼49.8161.65 ▲11.76
Media Library /wp-admin/upload.php1,422 ▲344.19 ▼0.0096.24 ▼11.8141.48 ▼6.43
WAH Forms /wp-admin/options-general.php?page=wahforms-page9071.9627.7030.77
All Items /wp-admin/edit.php?post_type=wah_forms1,0841.9630.1629.46
Add New WAH Form /wp-admin/post-new.php?post_type=wah_forms2,0173.2863.1888.72

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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)
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wah_forms
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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 take a closer look at the following
  • 9× 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/wah-forms/public/enqueue.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wah-forms/public/ajax.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wah-forms/admin/enqueue.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wah-forms/admin/helpers.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wah-forms/public/init.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wah-forms/admin/tpl/lead-item.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wah-forms/admin/init.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wah-forms/wah-forms.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wah-forms/admin/ajax.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: form builder, contact form, feedback, email, contact...

wah-forms/wah-forms.php 85% from 13 tests

The main PHP file in "WAH Forms" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "5.8")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.1" instead of "5.6")

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 plugin6,204 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP111753193,650
Sass47351,979
JavaScript24539571
CSS4044

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions4495.65%
▷ Anonymous functions24.35%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin