68% contact-us-page-contact-people

Code Review | Contact Us Page - Contact People

WordPress plugin Contact Us Page - Contact People scored68%from 54 tests.

About plugin

  • Plugin page: contact-us-page-c...
  • Plugin version: 3.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2013
  • Latest release: Nov 23, 2023
  • Number of updates: 180
  • Update frequency: every 21.1 days
  • Top authors: a3rev (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

900+ active /125,177 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲3.24MB] [CPU: ▲15.39ms] Passed 4 tests

Analyzing server-side resources used by Contact Us Page - Contact People
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.69 ▲3.2260.32 ▲21.24
Dashboard /wp-admin6.59 ▲3.2564.43 ▲2.59
Posts /wp-admin/edit.php6.61 ▲3.2666.68 ▲20.07
Add New Post /wp-admin/post-new.php9.33 ▲3.45107.09 ▲17.65
Media Library /wp-admin/upload.php6.45 ▲3.2259.83 ▲28.61
Add New Profile /wp-admin/admin.php?page=people-contact6.5660.11
Settings /wp-admin/admin.php?page=people-contact-settings6.5865.89
Profiles /wp-admin/admin.php?page=people-contact-manager6.5054.56
Groups /wp-admin/admin.php?page=people-category-manager6.5658.42

Server storage [IO: ▲2.69MB] [DB: ▲0.14MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 212 new files
Database: 1 new table, 31 new options
New tables
wp_cup_cp_profiles
New WordPress options
people_contact_widget_email_contact_form
widget_hide_maps_frontend
a3rev_wp_people_contact_ultimate_version
contact_page_global_reset_profile
people_email_inquiry_condition_text
people_contact_global_settings
people_contact_widget_condition_text
can_compress_scripts
contact_us_page_id
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Contact Us Page - Contact People
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,148 ▲38613.49 ▼0.788.20 ▲6.4444.98 ▼0.88
Dashboard /wp-admin2,460 ▲2805.54 ▼0.0892.91 ▼0.3474.48 ▲31.10
Posts /wp-admin/edit.php2,377 ▲2742.01 ▲0.0639.01 ▼4.6236.41 ▼0.55
Add New Post /wp-admin/post-new.php6,639 ▲5,11127.95 ▲4.77894.66 ▲264.0336.30 ▼20.40
Media Library /wp-admin/upload.php1,677 ▲2834.11 ▼0.13110.61 ▲10.5647.94 ▲7.23
Add New Profile /wp-admin/admin.php?page=people-contact2,4639.41322.65143.48
Settings /wp-admin/admin.php?page=people-contact-settings2,3564.2599.0378.57
Profiles /wp-admin/admin.php?page=people-contact-manager1,3843.8652.4980.07
Groups /wp-admin/admin.php?page=people-category-manager1,4483.6052.0186.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_cup_cp_profiles
  • The uninstall procedure has failed, leaving 30 options in the database
    • contact_us_page_contact_people_clean_on_deletion
    • people_contact_widget_content_before_maps
    • people_contact_widget_information_text
    • contact_us_page_id
    • a3rev_wp_people_contact_lite_version
    • widget_hide_maps_frontend
    • profile_email_page_id
    • people_contact_widget_maps
    • people_contact_grid_view_layout
    • a3rev_wp_people_contact_ultimate_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-us-page-contact-people/tinymce3/tinymce.php:26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/contact-us-page-contact-people/templates/customized_style.php on line 28
    • > PHP Warning
      Use of undefined constant PEOPLE_CONTACT_PREFIX - assumed 'PEOPLE_CONTACT_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-us-page-contact-people/templates/customized_style.php on line 44
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/contact-us-page-contact-people/templates/customized_style.php on line 21
    • > PHP Notice
      Undefined index: PEOPLE_CONTACT_PREFIXfonts_face in wp-content/plugins/contact-us-page-contact-people/templates/customized_style.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-us-page-contact-people/admin/people-contact-init.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/contact-us-page-contact-people/templates/customized_style.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contact-us-page-contact-people/widgets/class-people-contact-widgets.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function generate_font_css() on null in wp-content/plugins/contact-us-page-contact-people/templates/customized_style.php:44
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/contact-us-page-contact-people/templates/customized_style.php on line 35

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=people-contact
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&ver=6.3.1 215:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: people contact, contact us page, contact forms, wordpress contact us, contact us

contact-us-page-contact-people/people-contact.php 85% from 13 tests

"Contact Us Page - Contact People" version 3.7.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 256 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact-us-page-contact-people.php" instead of "people-contact.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected46,380 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP492,9792,47413,946
JSON10013,203
JavaScript372,0661,51312,698
CSS253051884,120
LESS685321,339
PO File1411588976
SVG53049
HTML12029
Sass21120

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 410)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity62.16
▷ Minimum class complexity1.00
▷ Maximum class complexity801.00
Average method complexity5.91
▷ Minimum method complexity1.00
▷ Maximum method complexity410.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods475
▷ Static methods6513.68%
▷ Public methods30664.42%
▷ Protected methods14129.68%
▷ Private methods285.89%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants20
▷ Global constants1575.00%
▷ Class constants525.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
58 PNG files occupy 0.28MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/p_icon_website.png1.74KB1.28KB▼ 26.28%
admin/assets/images/slider-handle-disable.png2.64KB1.81KB▼ 31.61%
admin/assets/images/slider-container-start.png1.69KB0.70KB▼ 58.32%
admin/assets/images/slider-handle2.png2.50KB1.65KB▼ 33.85%
assets/images/a3_location_icons.png7.12KB4.80KB▼ 32.49%