62% dimme-googlemaps

Code Review | Dimme Googlemap

WordPress plugin Dimme Googlemap scored 62% from 54 tests.

About plugin

  • Plugin page: dimme-googlemaps
  • Plugin version: 0.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.1
  • WordPress version: 5.8.1
  • First release: Apr 12, 2011
  • Latest release: Jun 15, 2016
  • Number of updates: 26
  • Update frequency: every 72.7 days
  • Top authors: disjfa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,312 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▼139.53ms] Passed 4 tests

Analyzing server-side resources used by Dimme Googlemap
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1938.19 ▲14.29
Dashboard /wp-admin3.17 ▲0.1244.56 ▼1.84
Posts /wp-admin/edit.php3.28 ▲0.1748.45 ▲6.15
Add New Post /wp-admin/post-new.php5.53 ▲0.0998.70 ▼562.90
Media Library /wp-admin/upload.php3.11 ▲0.1136.12 ▲0.49
googlemap /wp-admin/edit.php?post_type=googlemap3.0230.18
Dimme Googlemap /wp-admin/options-general.php?page=dimme_googlemaps_admin_init3.0932.54
Add googlemap /wp-admin/post-new.php?post_type=googlemap3.3155.07
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=googlemap3.1040.35

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: 1 new table, 2 new options
New tables
wp_dimme_googlemaps
New WordPress options
category_children
dimme_googlemaps_db_version

Browser metrics Passed 4 tests

Dimme Googlemap: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,902 ▲30617.76 ▲2.1516.93 ▲7.6952.51 ▲4.50
Dashboard /wp-admin3,023 ▲887.27 ▲1.31142.09 ▼21.77114.57 ▼8.79
Posts /wp-admin/edit.php2,792 ▲533.16 ▲0.4779.99 ▲15.72112.10 ▲19.37
Add New Post /wp-admin/post-new.php1,655 ▼2822.58 ▲3.81294.29 ▼81.59129.15 ▲13.39
Media Library /wp-admin/upload.php1,863 ▲535.91 ▲0.88143.90 ▼9.24120.66 ▼6.55
googlemap /wp-admin/edit.php?post_type=googlemap1,5333.1775.7690.80
Dimme Googlemap /wp-admin/options-general.php?page=dimme_googlemaps_admin_init1,2482.9865.7487.93
Add googlemap /wp-admin/post-new.php?post_type=googlemap4,05712.80333.19242.54
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=googlemap1,9632.9968.7395.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_dimme_googlemaps
  • This plugin does not fully uninstall, leaving 2 options in the database
    • dimme_googlemaps_db_version
    • category_children

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=googlemap
    • > Warning in wp-content/plugins/dimme-googlemaps/class.dimme-googlemaps.php+238
    in_array() expects parameter 2 to be array, bool given

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/dimme-googlemaps/archive-googlemap.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/dimme-googlemaps/dimme-googlemaps-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dimme-googlemaps/class.dimme-googlemaps.php:40
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/dimme-googlemaps/googlemap.php on line 76

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=googlemap
    • > Network (severe)
    http://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/post-new.php?post_type=googlemap
    • > Console-api (warning) in unknown
    http://maps.google.com/maps-api-v3/api/js/47/1/util.js 250:27 "Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys"
    • > GET request to /wp-admin/post-new.php?post_type=googlemap
    • > Console-api (warning) in unknown
    http://maps.google.com/maps-api-v3/api/js/47/1/util.js 250:27 "Google Maps JavaScript API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required"

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === dimme-googlemaps === )
You can take inspiration from this readme.txt

dimme-googlemaps/dimme-googlemaps.php Passed 13 tests

The main PHP file in "Dimme Googlemap" ver. 0.3.2 adds more information about the plugin and also serves as the entry point for this plugin
41 characters long description:
Googlemap plugin using custom post types.

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
Good job! No executable or dangerous file extensions detected943 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP694136618
JavaScript3299321
CSS1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity34.50
▷ Minimum class complexity25.00
▷ Maximum class complexity44.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/information-single.png0.86KB0.62KB▼ 27.40%
icons/information.png0.78KB0.62KB▼ 20.70%