78% iys-panel-wp-form

Code Review | İYS Panel WP Form

WordPress plugin İYS Panel WP Form scored78%from 54 tests.

About plugin

  • Plugin page: iys-panel-wp-form
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Jun 14, 2021
  • Latest release: Jul 26, 2021
  • Number of updates: 15
  • Update frequency: every 3.0 days
  • Top authors: hermesiletisim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.57MB] [CPU: ▼3.07ms] Passed 4 tests

A check of server-side resources used by İYS Panel WP Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4643.79 ▲5.27
Dashboard /wp-admin3.92 ▲0.6248.19 ▲1.47
Posts /wp-admin/edit.php3.97 ▲0.6146.48 ▼3.17
Add New Post /wp-admin/post-new.php6.51 ▲0.6284.50 ▼15.86
Media Library /wp-admin/upload.php3.85 ▲0.6137.31 ▲5.61
Forms /wp-admin/admin.php?page=iys-panel-wp-form-list3.9136.77
Connections /wp-admin/admin.php?page=iys-panel-wp-form3.9640.68
Create Form /wp-admin/admin.php?page=iys-panel-wp-form-forms3.6825.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 143 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
im4wp_version
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_im4wp_form_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

İYS Panel WP Form: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10714.41 ▲0.131.72 ▲0.0240.55 ▼2.95
Dashboard /wp-admin2,257 ▲775.53 ▼0.0982.49 ▼8.3841.03 ▼4.15
Posts /wp-admin/edit.php2,165 ▲652.01 ▲0.0434.89 ▼1.7635.21 ▲2.77
Add New Post /wp-admin/post-new.php6,390 ▲4,86427.47 ▲4.22832.08 ▲135.6060.36 ▲4.57
Media Library /wp-admin/upload.php1,467 ▲674.21 ▲0.0697.54 ▼12.9341.11 ▼6.68
Forms /wp-admin/admin.php?page=iys-panel-wp-form-list8821.8427.8729.49
Connections /wp-admin/admin.php?page=iys-panel-wp-form1,0651.9029.6428.25
Create Form /wp-admin/admin.php?page=iys-panel-wp-form-forms9061.9025.0829.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • im4wp_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_im4wp_form_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=iys-panel-wp-form-forms
    • > Notice in wp-content/plugins/iys-panel-wp-form/includes/class-iyspanel.php+372
    Trying to get property 'content' of non-object
    • > GET request to /wp-admin/admin.php?page=iys-panel-wp-form-forms
    • > Notice in wp-content/plugins/iys-panel-wp-form/includes/class-iyspanel.php+277
    Trying to get property 'recipient_groups' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=iys-panel-wp-form-forms
    • > Warning in wp-content/plugins/iys-panel-wp-form/includes/class-iyspanel.php+373
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=iys-panel-wp-form-forms
    • > Notice in wp-content/plugins/iys-panel-wp-form/includes/class-iyspanel.php+372
    Trying to get property 'iys_details' of non-object
    • > GET request to /wp-admin/admin.php?page=iys-panel-wp-form-forms
    • > Notice in wp-content/plugins/iys-panel-wp-form/includes/class-iyspanel.php+372
    Trying to get property 'brands' of non-object

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 esc_html__() in wp-content/plugins/iys-panel-wp-form/config/default-form-content.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'IM4WP_API_Exception' not found in wp-content/plugins/iys-panel-wp-form/includes/api/class-resource-not-found-exception.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'IM4WP_Dynamic_Content_Tags' not found in wp-content/plugins/iys-panel-wp-form/includes/forms/class-form-tags.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'IM4WP_API_Exception' not found in wp-content/plugins/iys-panel-wp-form/includes/api/class-connection-exception.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/iys-panel-wp-form/includes/views/parts/lists-overview.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/iys-panel-wp-form/config/default-form-messages.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/iys-panel-wp-form/includes/forms/views/tabs/form-fields.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/iys-panel-wp-form/includes/forms/views/tabs/form-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/iys-panel-wp-form/includes/forms/views/tabs/form-appearance.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #10, #11, #12, #13, #14, #15, #16, #2, #3, #4, #5, #6, #7, #8, #9 in iys-panel-wp-form/assets to your readme.txt
Please take inspiration from this readme.txt

iys-panel-wp-form/iyspanel-for-wp.php 85% from 13 tests

The primary PHP file in "İYS Panel WP Form" version 1.0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 417 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("iys-panel-wp-form.php" instead of "iyspanel-for-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected10,066 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP771,8103,5686,229
JavaScript384273872,069
CSS88940985
PO File1269312707
XML210064
SVG1007
JSON1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity14.57
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes44
▷ Abstract classes12.27%
▷ Concrete classes4397.73%
▷ Final classes00.00%
Methods374
▷ Static methods246.42%
▷ Public methods31183.16%
▷ Protected methods3910.43%
▷ Private methods246.42%
Functions45
▷ Named functions3782.22%
▷ Anonymous functions817.78%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png3.34KB1.80KB▼ 46.04%