78% wp-maps

Code Review | Wp Maps

WordPress plugin Wp Maps scored78%from 54 tests.

About plugin

  • Plugin page: wp-maps
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.5.2
  • WordPress version: 6.3.1
  • First release: Aug 23, 2011
  • Latest release: Sep 1, 2016
  • Number of updates: 28
  • Update frequency: every 74.8 days
  • Top authors: mimothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,122 total downloads

Benchmarks

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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.72MB] [CPU: ▲2.80ms] Passed 4 tests

A check of server-side resources used by Wp Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3144.50 ▲0.30
Dashboard /wp-admin4.17 ▲0.8751.79 ▼1.97
Posts /wp-admin/edit.php4.20 ▲0.8458.40 ▲8.92
Add New Post /wp-admin/post-new.php6.76 ▲0.88108.62 ▲12.53
Media Library /wp-admin/upload.php4.09 ▲0.8644.23 ▲3.94
All Locations /wp-admin/edit.php?post_type=wpmaps_location4.1442.00
Add New Location /wp-admin/post-new.php?post_type=wpmaps_location4.6362.73
Wp Maps /wp-admin/options-general.php?page=wp-maps-settings4.4342.39
Categories /wp-admin/edit-tags.php?taxonomy=wpmaps_location_category&post_type=wpmaps_location4.0942.35

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 268 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp Maps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲17314.13 ▼0.487.18 ▲5.2444.46 ▼0.72
Dashboard /wp-admin2,252 ▲644.94 ▼0.95109.95 ▼6.3742.00 ▼0.57
Posts /wp-admin/edit.php2,138 ▲492.06 ▲0.0542.50 ▲2.7535.00 ▲0.95
Add New Post /wp-admin/post-new.php1,550 ▲3017.66 ▼5.42684.16 ▼5.7473.99 ▲15.21
Media Library /wp-admin/upload.php1,434 ▲464.24 ▲0.0096.49 ▼14.4744.31 ▼1.65
All Locations /wp-admin/edit.php?post_type=wpmaps_location1,1132.0132.6829.45
Add New Location /wp-admin/post-new.php?post_type=wpmaps_location3,2067.67195.4971.11
Wp Maps /wp-admin/options-general.php?page=wp-maps-settings8631.9838.0328.19
Categories /wp-admin/edit-tags.php?taxonomy=wpmaps_location_category&post_type=wpmaps_location1,3112.3227.4528.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-maps/public/views/public.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-maps/admin/includes/CMB2/init.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-maps/admin/includes/Addons/cmb_field_map-master/cmb-field-map.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-maps/admin/includes/CMB2/bootstrap.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-maps/admin/includes/WP-Contextual-Help/wp-contextual-help.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-maps/admin/views/admin.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-maps/includes/Widgets-Helper/wph-widget-class.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-maps/templates/single-map.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-maps/includes/widgets/mm-widget-map.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #3 is missing in wp-maps/assets to your readme.txt
  • Tags: There are too many tags (51 tag instead of maximum 10)
You can look at the official readme.txt

wp-maps/wp-maps.php Passed 13 tests

The primary PHP file in "Wp Maps" version 3.0 is used by WordPress to initiate all plugin functionality
51 characters long description:
Google Maps with custom icons, colors and locations

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin39,359 lines of code in 188 files:
LanguageFilesBlank linesComment linesLines of code
PO File968,91411,87620,460
CSS122,0871,03410,319
PHP361,7193,7085,088
JavaScript175514051,666
Sass13176251,151
Markdown81530445
SVG300207
JSON10011
Ruby13111
HTML1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity28.31
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods346
▷ Static methods4111.85%
▷ Public methods33095.38%
▷ Protected methods72.02%
▷ Private methods92.60%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.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
16 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/includes/CMB2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
admin/includes/CMB2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
admin/includes/CMB2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
admin/includes/CMB2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
admin/includes/CMB2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%