72% piotnetforms

Code Review | Piotnet Forms

WordPress plugin Piotnet Forms scored72%from 54 tests.

About plugin

  • Plugin page: piotnetforms
  • Plugin version: 1.0.25
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Sep 18, 2020
  • Latest release: Nov 9, 2022
  • Number of updates: 49
  • Update frequency: every 16.0 days
  • Top authors: piotnetdotcom (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

4,000+ active /34,708 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.49MB] [CPU: ▲4.55ms] Passed 4 tests

This is a short check of server-side resources used by Piotnet Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.98 ▲1.5245.76 ▲3.97
Dashboard /wp-admin4.82 ▲1.5157.79 ▲1.71
Posts /wp-admin/edit.php4.87 ▲1.5266.22 ▲12.10
Add New Post /wp-admin/post-new.php7.36 ▲1.47107.93 ▲0.41
Media Library /wp-admin/upload.php4.68 ▲1.4551.21 ▲16.17
Import /wp-admin/admin.php?page=import-piotnetforms4.6539.94
Booking (Pro) /wp-admin/edit.php?post_type=piotnetforms-book4.5536.36
Abandonment (Pro) /wp-admin/edit.php?post_type=piotnetforms-aban4.5536.09
Forms /wp-admin/edit.php?post_type=piotnetforms4.8158.64
Database (Pro) /wp-admin/edit.php?post_type=piotnetforms-data4.5537.31
Settings /wp-admin/admin.php?page=piotnetforms4.7154.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 215 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Piotnet Forms: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.60 ▼0.805.64 ▲4.0140.88 ▲1.11
Dashboard /wp-admin2,252 ▲615.82 ▲0.96101.72 ▼0.7139.45 ▼4.95
Posts /wp-admin/edit.php2,139 ▲472.03 ▲0.0140.83 ▼0.2038.61 ▲2.72
Add New Post /wp-admin/post-new.php6,263 ▲4,74426.15 ▲3.04896.78 ▲250.0163.47 ▲4.33
Media Library /wp-admin/upload.php1,438 ▲534.23 ▲0.0598.36 ▼14.3146.91 ▲0.29
Import /wp-admin/admin.php?page=import-piotnetforms8471.7124.7831.22
Booking (Pro) /wp-admin/edit.php?post_type=piotnetforms-book280.440.074.18
Abandonment (Pro) /wp-admin/edit.php?post_type=piotnetforms-aban280.440.074.17
Forms /wp-admin/edit.php?post_type=piotnetforms1,1132.0033.4334.16
Database (Pro) /wp-admin/edit.php?post_type=piotnetforms-data280.440.064.31
Settings /wp-admin/admin.php?page=piotnetforms1,0912.0326.4134.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=import-piotnetforms
    • > Warning in wp-content/plugins/piotnetforms/inc/settings/import-page.php+11
    scandir(wp-content/plugins/piotnetforms/inc/settings/../../assets/forms/templates/): failed to open dir: No such file or directory
    • > GET request to /wp-admin/admin.php?page=import-piotnetforms
    • > Warning in wp-content/plugins/piotnetforms/inc/settings/import-page.php+11
    scandir(): (errno 2): No such file or directory
    • > GET request to /wp-admin/admin.php?page=import-piotnetforms
    • > Warning in wp-content/plugins/piotnetforms/inc/settings/import-page.php+11
    array_diff(): Expected parameter 1 to be an array, bool given
    • > GET request to /wp-admin/admin.php?page=import-piotnetforms
    • > Warning in wp-content/plugins/piotnetforms/inc/settings/import-page.php+13
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/piotnetforms/inc/forms/meta-box-piotnetforms-shortcode-in-post.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=piotnetforms-book
    • > Network (severe)
    wp-admin/edit.php?post_type=piotnetforms-book - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit.php?post_type=piotnetforms-aban
    • > Network (severe)
    wp-admin/edit.php?post_type=piotnetforms-aban - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit.php?post_type=piotnetforms-data
    • > Network (severe)
    wp-admin/edit.php?post_type=piotnetforms-data - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3 in piotnetforms/assets to your readme.txt
You can look at the official readme.txt

piotnetforms/piotnetforms.php 92% from 13 tests

"Piotnet Forms" version 1.0.25's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected31,813 lines of code in 192 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,5572019,931
SVG290349,849
JavaScript78875976,966
CSS22328953,083
JSON2001,984

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity13.62
▷ Minimum class complexity1.00
▷ Maximum class complexity209.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes47
▷ Abstract classes36.38%
▷ Concrete classes4493.62%
▷ Final classes00.00%
Methods319
▷ Static methods30.94%
▷ Public methods26984.33%
▷ Protected methods206.27%
▷ Private methods309.40%
Functions37
▷ Named functions3594.59%
▷ Anonymous functions25.41%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
assets/images/piotnetbuilder.png9.50KB2.06KB▼ 78.29%
assets/images/signature.png6.00KB5.03KB▼ 16.19%
assets/images/piotnet-logo.png9.58KB2.99KB▼ 68.80%