77% wp-ultimate-map

Code Review | WP-Ultimate-Map

WordPress plugin WP-Ultimate-Map scored77%from 54 tests.

About plugin

  • Plugin page: wp-ultimate-map
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.3
  • WordPress version: 6.3.1
  • First release: Dec 5, 2015
  • Latest release: May 21, 2016
  • Number of updates: 9
  • Update frequency: every 19.1 days
  • Top authors: rahulbhangale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼7.01ms] Passed 4 tests

This is a short check of server-side resources used by WP-Ultimate-Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.24 ▼3.18
Dashboard /wp-admin3.48 ▲0.1851.67 ▼0.05
Posts /wp-admin/edit.php3.60 ▲0.2450.35 ▼7.91
Add New Post /wp-admin/post-new.php6.07 ▲0.1886.17 ▼15.31
Media Library /wp-admin/upload.php3.38 ▲0.1533.24 ▼1.63
Add New /wp-admin/post-new.php?post_type=place3.5965.87
Places /wp-admin/edit.php?post_type=place3.4643.36
Google Map settings /wp-admin/options-general.php?page=wpgl-settings3.3532.29
Add New /wp-admin/post-new.php?post_type=route3.5153.34
Markers /wp-admin/edit-tags.php?taxonomy=marker&post_type=place3.3735.68
Route Types /wp-admin/edit-tags.php?taxonomy=route_taxo&post_type=route3.3735.70
Route By /wp-admin/edit-tags.php?taxonomy=route_by&post_type=place3.3734.97
Routes /wp-admin/edit.php?post_type=route3.4645.09

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
marker_children

Browser metrics Passed 4 tests

An overview of browser requirements for WP-Ultimate-Map
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,023 ▲26214.80 ▲0.391.71 ▼0.0246.46 ▲5.11
Dashboard /wp-admin2,423 ▲2466.33 ▲0.75113.68 ▲23.0337.25 ▼5.44
Posts /wp-admin/edit.php2,348 ▲2483.50 ▲1.5550.20 ▲9.5132.78 ▼6.40
Add New Post /wp-admin/post-new.php1,600 ▲22523.82 ▲4.80663.74 ▲122.1937.16 ▼34.84
Media Library /wp-admin/upload.php1,494 ▲914.22 ▲0.0186.98 ▼14.6546.47 ▲5.61
Add New /wp-admin/post-new.php?post_type=place2,6609.62286.29193.28
Places /wp-admin/edit.php?post_type=place1,2983.5949.4728.61
Google Map settings /wp-admin/options-general.php?page=wpgl-settings1,8477.62137.6375.50
Add New /wp-admin/post-new.php?post_type=route2,5979.41235.46126.20
Markers /wp-admin/edit-tags.php?taxonomy=marker&post_type=place1,5493.5043.5530.99
Route Types /wp-admin/edit-tags.php?taxonomy=route_taxo&post_type=route1,6513.8652.1230.22
Route By /wp-admin/edit-tags.php?taxonomy=route_by&post_type=place1,6453.8056.5030.14
Routes /wp-admin/edit.php?post_type=route1,3013.4348.7826.76

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • marker_children

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wpgl-settings
    • > Notice in wp-content/plugins/wp-ultimate-map/admin/class-admin.php+37
    Undefined variable: focus_point
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=route_by&post_type=place
    • > Notice in wp-content/plugins/wp-ultimate-map/admin/post-types/place-marker.php+276
    Trying to access array offset on value of type int

SRP 50% 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
Please fix the following
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-ultimate-map/wp-ultimate-map.php on line 13
    • > PHP Notice
      Undefined variable: select_all_routes in wp-content/plugins/wp-ultimate-map/view/view.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-ultimate-map/admin/post-types/place-route.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'CPT' not found in wp-content/plugins/wp-ultimate-map/src/register-post-types.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-ultimate-map/admin/post-types/place-marker.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-ultimate-map/wp-ultimate-map.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/wp-ultimate-map/view/view.php:20
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-ultimate-map/wp-ultimate-map.php on line 14
    • > PHP Notice
      Undefined variable: select_all_places in wp-content/plugins/wp-ultimate-map/view/view.php on line 3

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)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-ultimate-map === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Pop up on load of your website to promote your offers to users.), #2 (Display the Promotion bar or Notification bar at the top of your page), #3 (Display the Promotion bar or Notification bar at the top of your page), #4 (Left Floating promotion area for your page), #5 (Enable Your promotion bar and Popup from your administration panel.), #6 (Align you promotion bar at particular side of your website), #7 (Set the contents of your promotion bar.), #8 (Set catchy colors for your promotion or notifications.), #9 (View Visitors Statistics to manage your promotion)
You can take inspiration from this readme.txt

wp-ultimate-map/wp-ultimate-map.php 85% from 13 tests

The main file in "WP-Ultimate-Map" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: A good plugin description is longer than 10 characters (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,160 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP94155661,384
JavaScript27321534
CSS2125242

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.57
▷ Minimum class complexity3.00
▷ Maximum class complexity66.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods23.85%
▷ Public methods5198.08%
▷ Protected methods11.92%
▷ Private methods00.00%
Functions13
▷ Named functions1076.92%
▷ Anonymous functions323.08%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin