66% advanced-angular-contact-form

Code Review | Advanced Angular Contact Form

WordPress plugin Advanced Angular Contact Form scored 66% from 54 tests.

About plugin

  • Plugin page: advanced-angular-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 5.9.2
  • First release: Feb 27, 2018
  • Latest release: Mar 6, 2018
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: Tauhidul Alam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼294.94ms] Passed 4 tests

Analyzing server-side resources used by Advanced Angular Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.1955.73 ▲3.55
Dashboard /wp-admin3.57 ▲0.1634.03 ▲0.17
Posts /wp-admin/edit.php3.79 ▲0.1537.88 ▲0.05
Add New Post /wp-admin/post-new.php7.04 ▲0.0793.95 ▼1,179.75
Media Library /wp-admin/upload.php3.45 ▲0.1526.77 ▼0.21
Edit Form /wp-admin/admin.php?page=ng-edit-form3.4022.95
All Forms /wp-admin/admin.php?page=ng-forms3.4725.09
Add Form /wp-admin/admin.php?page=ng-add-form3.4221.64

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 1 new option
New WordPress options
ngContact_form_preview_page

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Angular Contact Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,821 ▲6716.23 ▲0.856.33 ▼1.572.35 ▼1.44
Dashboard /wp-admin2,925 ▲716.14 ▼0.02122.18 ▼16.65158.99 ▼3.04
Posts /wp-admin/edit.php2,720 ▲323.24 ▲0.0061.30 ▼3.73139.00 ▲0.96
Add New Post /wp-admin/post-new.php1,773 ▲8321.64 ▲0.31456.68 ▲6.29157.10 ▲2.47
Media Library /wp-admin/upload.php1,728 ▲305.51 ▲0.03136.76 ▼13.86184.73 ▼3.45
Edit Form /wp-admin/admin.php?page=ng-edit-form82018.46676.6672.50
All Forms /wp-admin/admin.php?page=ng-forms1,2842.3954.8593.25
Add Form /wp-admin/admin.php?page=ng-add-form1,26423.11695.50123.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • ngContact_form_preview_page

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=ng-edit-form
    • > Notice in wp-content/plugins/advanced-angular-contact-form/contact-form.php+882
    Undefined index: id

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/advanced-angular-contact-form/templates/fields/before-form-fields.php
  • 81× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: field_object in wp-content/plugins/advanced-angular-contact-form/templates/fields/checkbox-field.php on line 13
    • > PHP Notice
      Undefined variable: field_object in wp-content/plugins/advanced-angular-contact-form/templates/fields/checkbox-field.php on line 7
    • > PHP Notice
      Undefined variable: field_object in wp-content/plugins/advanced-angular-contact-form/templates/fields/checkbox-field.php on line 2
    • > PHP Notice
      Undefined variable: field_object in wp-content/plugins/advanced-angular-contact-form/templates/fields/textarea-field.php on line 7
    • > PHP Notice
      Trying to get property 'required' of non-object in wp-content/plugins/advanced-angular-contact-form/templates/fields/checkbox-field.php on line 2
    • > PHP Notice
      Trying to get property 'required' of non-object in wp-content/plugins/advanced-angular-contact-form/templates/fields/select-field.php on line 7
    • > PHP Notice
      Trying to get property 'required' of non-object in wp-content/plugins/advanced-angular-contact-form/templates/fields/email-field.php on line 2
    • > PHP Notice
      Trying to get property 'hide_label' of non-object in wp-content/plugins/advanced-angular-contact-form/templates/fields/email-field.php on line 14
    • > PHP Notice
      Trying to get property 'required' of non-object in wp-content/plugins/advanced-angular-contact-form/templates/fields/text-field.php on line 14
    • > PHP Notice
      Undefined variable: field_object in wp-content/plugins/advanced-angular-contact-form/templates/fields/radio-field.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=ng-edit-form
    • > Console-api (severe) in unknown
    ng:///t/t_Host.ngfactory.js 4:26 "ERROR" Error: The selector "contact-form" did not match any elementsat t.selectRootElement (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:333767)at t.selectRootElement (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:1539083)at t.selectRootElement (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:126882)at hi (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:83093)at zo (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:108740)at No (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:107992)at Rs (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:125057)at Object.rs [as createRootView] (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:118693)at e.create (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:87601)at e.create (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:36382)
    • > GET request to /wp-admin/admin.php?page=ng-edit-form
    • > Console-api (severe) in unknown
    ng:///t/t_Host.ngfactory.js 4:26 "ERROR CONTEXT" t
    • > GET request to /wp-admin/admin.php?page=ng-edit-form
    • > Console-api (severe) in unknown
    /wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1 0:896190 Error: The selector "contact-form" did not match any elementsat t.selectRootElement (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:333767)at t.selectRootElement (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:1539083)at t.selectRootElement (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:126882)at hi (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:83093)at zo (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:108740)at No (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:107992)at Rs (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:125057)at Object.rs [as createRootView] (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:118693)at e.create (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:87601)at e.create (/wp-content/plugins/advanced-angular-contact-form/dist/app.bundle.js?ver=1.1.1:1:36382)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #6 (Short code view of a created form.)
  • Screenshots: A description for screenshot #2 is missing in advanced-angular-contact-form/assets to your readme.txt
Please take inspiration from this readme.txt

advanced-angular-contact-form/contact-form.php 85% from 13 tests

The main PHP script in "Advanced Angular Contact Form" version 1.1.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-angular-contact-form.php" instead of "contact-form.php")

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 detected1,455 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP132683451,342
CSS4331112
JavaScript2031

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity28.00
▷ Minimum class complexity6.00
▷ Maximum class complexity48.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods50
▷ Static methods12.00%
▷ Public methods3570.00%
▷ Protected methods00.00%
▷ Private methods1530.00%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin