84% frodo-google-maps

Code Review | Frodo Google Maps

WordPress plugin Frodo Google Maps scored84%from 54 tests.

About plugin

  • Plugin page: frodo-google-maps
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: Oct 25, 2017
  • Latest release: Nov 22, 2017
  • Number of updates: 10
  • Update frequency: every 4.5 days
  • Top authors: sndsabin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /654 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.43ms] Passed 4 tests

This is a short check of server-side resources used by Frodo Google Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.48 ▼4.51
Dashboard /wp-admin3.36 ▲0.0549.66 ▼4.05
Posts /wp-admin/edit.php3.41 ▲0.0553.75 ▲2.53
Add New Post /wp-admin/post-new.php5.96 ▲0.0899.27 ▼1.77
Media Library /wp-admin/upload.php3.28 ▲0.0538.07 ▲0.61
Google Maps /wp-admin/edit.php?post_type=frodo_google_map3.3240.88
Add New /wp-admin/post-new.php?post_type=frodo_google_map3.3351.75
Setting /wp-admin/edit.php?post_type=frodo_google_map&page=frodo_google_map_setting3.2335.92
Location Markers /wp-admin/edit-tags.php?taxonomy=location-marker&post_type=frodo_google_map3.3039.65

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
GOOGLE_MAP_API_KEY
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Frodo Google Maps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.27 ▼0.934.56 ▲2.6143.07 ▼1.67
Dashboard /wp-admin2,246 ▲584.88 ▼0.98102.89 ▼16.1640.22 ▼4.42
Posts /wp-admin/edit.php2,132 ▲432.01 ▼0.0040.90 ▲1.1036.40 ▲0.52
Add New Post /wp-admin/post-new.php1,571 ▲5718.30 ▲0.92643.97 ▼51.5763.68 ▲2.61
Media Library /wp-admin/upload.php1,431 ▲434.29 ▲0.1399.75 ▼18.8445.38 ▼2.37
Google Maps /wp-admin/edit.php?post_type=frodo_google_map1,1051.9436.9832.49
Add New /wp-admin/post-new.php?post_type=frodo_google_map1,7512.7564.29106.63
Setting /wp-admin/edit.php?post_type=frodo_google_map&page=frodo_google_map_setting8122.0826.2726.12
Location Markers /wp-admin/edit-tags.php?taxonomy=location-marker&post_type=frodo_google_map1,7463.4050.9042.12

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • GOOGLE_MAP_API_KEY

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FrodoGoogleMaps\\plugin_dir_url() in wp-content/plugins/frodo-google-maps/frodo-google-maps.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FrodoGoogleMaps\\includes\\add_action() in wp-content/plugins/frodo-google-maps/includes/GoogleMapPostType.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FrodoGoogleMaps\\includes\\add_shortcode() in wp-content/plugins/frodo-google-maps/includes/ShortCode.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FrodoGoogleMaps\\includes\\add_action() in wp-content/plugins/frodo-google-maps/includes/LocationMarkerTermMeta.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FrodoGoogleMaps\\includes\\add_action() in wp-content/plugins/frodo-google-maps/includes/Setting.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FrodoGoogleMaps\\includes\\add_action() in wp-content/plugins/frodo-google-maps/includes/EnqueueAssets.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FrodoGoogleMaps\\includes\\add_action() in wp-content/plugins/frodo-google-maps/includes/MetaBox.php:17

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in frodo-google-maps/assets to your readme.txt
You can take inspiration from this readme.txt

frodo-google-maps/frodo-google-maps.php Passed 13 tests

This is the main PHP file of "Frodo Google Maps" version 2.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
A Simple Plugin that helps to CRUD Google Maps

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,039 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP7196181654
JavaScript88048319
CSS431463
SVG1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.17
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2080.00%
▷ Protected methods520.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin