62% go-contact

Code Review | Go-Contact

WordPress plugin Go-Contact scored 62% from 54 tests.

About plugin

  • Plugin page: go-contact
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9.1
  • WordPress version: 5.8.1
  • First release: Oct 7, 2012
  • Latest release: May 25, 2014
  • Number of updates: 23
  • Update frequency: every 25.9 days
  • Top authors: rahulbalakrishna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 828 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.90MB] [CPU: ▼176.73ms] Passed 4 tests

An overview of server-side resources used by Go-Contact
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.32 ▲12.39
Dashboard /wp-admin2.75 ▼0.3122.16 ▼23.65
Posts /wp-admin/edit.php2.75 ▼0.3621.37 ▼24.12
Add New Post /wp-admin/post-new.php2.75 ▼2.6921.69 ▼640.58
Media Library /wp-admin/upload.php2.75 ▼0.2620.75 ▼18.58
Create Form /wp-admin/admin.php?page=Go-Contact2.7521.80
Edit Form /wp-admin/admin.php?page=Go-Edit-Contact2.7518.88
Go-Contact /wp-admin/admin.php?page=go-contact/start.php2.7523.47
Edit Go-Contact Form /wp-admin/admin.php?page=GO-Edit-Single-Page2.7520.96

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 40 new files
Database: 1 new table, no new options
New tables
wp_go_contact_details

Browser metrics Passed 4 tests

Checking browser requirements for Go-Contact
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲22916.21 ▲0.1816.73 ▲6.5345.26 ▼1.51
Dashboard /wp-admin3,009 ▲785.93 ▼0.03144.37 ▼5.29105.04 ▼4.53
Posts /wp-admin/edit.php2,778 ▲392.72 ▲0.0169.09 ▼1.9183.48 ▼5.92
Add New Post /wp-admin/post-new.php1,525 ▼2,20818.56 ▼0.00390.46 ▼93.78106.01 ▲0.99
Media Library /wp-admin/upload.php1,846 ▲245.12 ▲0.09149.18 ▲8.85113.66 ▼6.68
Create Form /wp-admin/admin.php?page=Go-Contact1,5902.6363.7279.60
Edit Form /wp-admin/admin.php?page=Go-Edit-Contact1,1072.0952.3363.40
Go-Contact /wp-admin/admin.php?page=go-contact/start.php1,0312.0852.9965.02
Edit Go-Contact Form /wp-admin/admin.php?page=GO-Edit-Single-Page1,5852.5454.7883.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_go_contact_details

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 39 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+127
    Undefined variable: enable_captcha
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+214
    Undefined variable: form_array
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+131
    Trying to get property 'public_key' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+135
    Trying to get property 'private_key' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+139
    Undefined variable: div_class_name
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+162
    Trying to get property 'contact_form_content' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+174
    Trying to get property 'mail_to' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+178
    Trying to get property 'id_list' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+182
    Trying to get property 'mail_body' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+193
    Trying to get property 'php_code' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+203
    Trying to get property 'javascript_code' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+214
    Trying to get property 'file_url' of non-object
    • > GET request to /wp-admin/admin.php?page=GO-Edit-Single-Page
    • > Notice in wp-content/plugins/go-contact/edit_single_form.php+223
    Undefined variable: id

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/go-contact/shortcode_show.php
  • 6× 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/go-contact/start.php:33
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/wp-config.php' (include_path='.:/usr/share/php') in wp-content/plugins/go-contact/save_form.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/go-contact/create_form.php:4
    • > PHP Warning
      require(wp-content/wp-config.php): failed to open stream: No such file or directory in wp-content/plugins/go-contact/save_form.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/go-contact/edit_single_form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/go-contact/edit_form.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

go-contact/start.php 92% from 13 tests

"Go-Contact" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("go-contact.php" instead of "start.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,372 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7108182757
CSS133150380
JavaScript22424235

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
29 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png0.13KB0.15KB0.00%
css/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/humanity/images/ui-icons_f08000_256x240.png4.27KB4.11KB▼ 3.78%
css/humanity/images/ui-icons_cb672b_256x240.png4.27KB4.11KB▼ 3.78%
css/humanity/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%