66% contact-page-with-google-map

Code Review | Contact Page With Google Map

WordPress plugin Contact Page With Google Map scored 66% from 54 tests.

About plugin

  • Plugin page: contact-page-with...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.2
  • WordPress version: 5.8.1
  • First release: May 23, 2017
  • Latest release: Dec 20, 2018
  • Number of updates: 33
  • Update frequency: every 17.5 days
  • Top authors: corporatezen222 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,490 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼143.74ms] Passed 4 tests

This is a short check of server-side resources used by Contact Page With Google Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.3137.26 ▲14.09
Dashboard /wp-admin3.09 ▲0.0427.09 ▼19.93
Posts /wp-admin/edit.php3.37 ▲0.2547.57 ▼4.39
Add New Post /wp-admin/post-new.php5.71 ▲0.2792.33 ▼546.43
Media Library /wp-admin/upload.php3.12 ▲0.1228.37 ▼4.20
Add New /wp-admin/post-new.php?post_type=contact_page_cpt3.13175.85
CPWGM Display Options /wp-admin/options-general.php?page=cpwgm_settings_page3.0828.82
All Contact Pages /wp-admin/edit.php?post_type=contact_page_cpt3.1425.24

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Page With Google Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲8816.20 ▲0.378.01 ▼1.4742.04 ▼4.41
Dashboard /wp-admin3,010 ▲795.94 ▲0.02133.36 ▼12.91118.06 ▼0.68
Posts /wp-admin/edit.php2,779 ▲402.70 ▲0.0066.58 ▲2.2791.72 ▲1.04
Add New Post /wp-admin/post-new.php1,698 ▲1518.89 ▲0.06381.32 ▲3.86111.99 ▼5.60
Media Library /wp-admin/upload.php1,850 ▲435.01 ▼0.00147.76 ▲7.21121.24 ▲0.92
Add New /wp-admin/post-new.php?post_type=contact_page_cpt2,4143.59111.0676.15
CPWGM Display Options /wp-admin/options-general.php?page=cpwgm_settings_page1,2392.0857.9083.84
All Contact Pages /wp-admin/edit.php?post_type=contact_page_cpt1,4682.6367.4690.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • cpwgm__settings

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=contact_page_cpt
    • > Notice in wp-content/plugins/contact-page-with-google-map/dynamic_metadata.php+118
    Trying to get property 'action' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=contact_page_cpt
    • > Notice in wp-content/plugins/contact-page-with-google-map/dynamic_metadata.php+119
    Undefined index: prevent_delete_meta_movetotrash
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=contact_page_cpt
    • > Notice in wp-content/plugins/contact-page-with-google-map/contact-page-with-google-map.php+336
    Trying to get property 'post_type' of non-object

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 output text when accessed directly:
    • > /wp-content/plugins/contact-page-with-google-map/contact-page-with-google-map.php
  • 3× 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/contact-page-with-google-map/dynamic_metadata.php:237
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-page-with-google-map/settings_page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/contact-page-with-google-map/shortcode.php:276

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/post-new.php?post_type=contact_page_cpt
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/contact-page-with-google-map/js/cpwgm_admin.js?ver=5.8.1:72:28)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=contact_page_cpt
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).live is not a function


Plugin configuration 86% 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
These attributes need your attention: The official readme.txt might help

contact-page-with-google-map/contact-page-with-google-map.php 77% from 13 tests

"Contact Page With Google Map" version 1.6.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:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,159 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3090.91%
▷ Anonymous functions39.09%
▷ Global constants00.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