83% google-map-on-postpage

Code Review | Google Map on Post/Page

WordPress plugin Google Map on Post/Page scored83%from 54 tests.

About plugin

  • Plugin page: google-map-on-pos...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2013
  • Latest release: Oct 19, 2013
  • Number of updates: 5
  • Update frequency: every 3.6 days
  • Top authors: mesunil2010 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,021 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.67MB] [CPU: ▼17.29ms] Passed 4 tests

Analyzing server-side resources used by Google Map on Post/Page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.93 ▼9.40
Dashboard /wp-admin3.34 ▲0.0443.84 ▼4.10
Posts /wp-admin/edit.php3.39 ▲0.0444.56 ▼3.40
Add New Post /wp-admin/post-new.php3.13 ▼2.7636.73 ▼52.25
Media Library /wp-admin/upload.php3.26 ▲0.0440.12 ▲3.89

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Google Map on Post/Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲16913.74 ▼0.465.25 ▲3.4441.33 ▼2.30
Dashboard /wp-admin2,206 ▲155.80 ▲0.8996.36 ▼12.5039.82 ▼7.02
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0133.14 ▼4.3031.76 ▼2.51
Add New Post /wp-admin/post-new.php6,890 ▲5,35727.68 ▲4.521,058.19 ▲403.1791.05 ▲41.78
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.01104.73 ▲2.6147.54 ▲1.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-map-on-postpage/mappost.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

google-map-on-postpage/mappost.php 85% from 13 tests

The entry point to "Google Map on Post/Page" version 1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("google-map-on-postpage.php" instead of "mappost.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
Everything looks great! No dangerous files found in this plugin196 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15649196

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected