74% geo-hcard-map

Code Review | Geo hCard Map

WordPress plugin Geo hCard Map scored74%from 54 tests.

About plugin

  • Plugin page: geo-hcard-map
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: May 24, 2019
  • Number of updates: 23
  • Update frequency: every 30.5 days
  • Top authors: anewholm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /896 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.92MB] [CPU: ▼34.17ms] Passed 4 tests

An overview of server-side resources used by Geo hCard Map
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0424.34 ▼18.85
Dashboard /wp-admin3.02 ▼0.2825.08 ▼24.16
Posts /wp-admin/edit.php3.03 ▼0.3328.29 ▼23.19
Add New Post /wp-admin/post-new.php3.02 ▼2.8625.92 ▼70.46
Media Library /wp-admin/upload.php3.03 ▼0.2022.35 ▼14.53
GEO hCard Map /wp-admin/options-general.php?page=geo-hcard-map3.0327.87

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
geo-hcard-map_show_activation_message

Browser metrics Passed 4 tests

An overview of browser requirements for Geo hCard Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17414.28 ▼0.0713.92 ▲11.8839.76 ▼4.32
Dashboard /wp-admin2,244 ▲675.60 ▲0.0388.22 ▼14.5240.40 ▼3.56
Posts /wp-admin/edit.php2,145 ▲452.00 ▼0.0042.09 ▲4.2237.72 ▲3.45
Add New Post /wp-admin/post-new.php1,578 ▲5023.16 ▲0.05671.69 ▼30.4457.51 ▲6.37
Media Library /wp-admin/upload.php1,445 ▲454.24 ▲0.0399.73 ▼9.3447.81 ▲0.34
GEO hCard Map /wp-admin/options-general.php?page=geo-hcard-map8511.8124.0526.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • geo-hcard-map_show_activation_message
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=geo-hcard-map
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: location, map, vcard, hcard, leaflet...

geo-hcard-map/geo-hcard-map.php Passed 13 tests

"Geo hCard Map" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
Creates a map from the hCard markup (.vcard) in the current webpage at shortcode [geo_hcard_map]

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 plugin8,247 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52,6583,2427,549
CSS35422569
PHP12214122
Markdown1207

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/marker.png1.43KB1.55KB0.00%
images/blue-bicycle-shadow.png0.66KB0.54KB▼ 17.59%
images/shiny-silver-star.png3.01KB1.88KB▼ 37.75%
leaflet/images/marker-icon.png1.43KB1.55KB0.00%
images/gray-green.png2.84KB2.00KB▼ 29.87%