78% manifold-google-maps

Code Review | Manifold Google Maps

WordPress plugin Manifold Google Maps scored78%from 54 tests.

About plugin

  • Plugin page: manifold-google-maps
  • Plugin version: 1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 13, 2022
  • Latest release: Sep 6, 2023
  • Number of updates: 28
  • Update frequency: every 21.6 days
  • Top authors: itpathsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.25ms] Passed 4 tests

An overview of server-side resources used by Manifold Google Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2247.89 ▲8.74
Dashboard /wp-admin3.52 ▲0.1851.15 ▼12.88
Posts /wp-admin/edit.php3.63 ▲0.2853.57 ▲5.44
Add New Post /wp-admin/post-new.php6.15 ▲0.2689.31 ▼7.80
Media Library /wp-admin/upload.php3.44 ▲0.2239.25 ▲2.25
Settings /wp-admin/edit.php?post_type=marker&page=manifold-google-maps3.4149.12
Add New Marker /wp-admin/post-new.php?post_type=marker3.5255.02
All Markers /wp-admin/edit.php?post_type=marker3.4939.75
Maps /wp-admin/edit-tags.php?taxonomy=map&post_type=marker3.4437.59

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Manifold Google Maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲20814.45 ▲0.1031.33 ▲29.6741.32 ▼1.11
Dashboard /wp-admin2,241 ▲615.69 ▲0.0491.92 ▼0.6940.29 ▼3.28
Posts /wp-admin/edit.php2,149 ▲492.07 ▲0.0343.99 ▲3.9335.81 ▼0.57
Add New Post /wp-admin/post-new.php1,566 ▲4023.76 ▲0.26674.57 ▼8.8353.15 ▼9.94
Media Library /wp-admin/upload.php1,446 ▲464.25 ▲0.0399.49 ▼10.9945.97 ▼2.82
Settings /wp-admin/edit.php?post_type=marker&page=manifold-google-maps8981.6939.4742.54
Add New Marker /wp-admin/post-new.php?post_type=marker1,8513.7468.6532.27
All Markers /wp-admin/edit.php?post_type=marker1,1282.0234.8335.09
Maps /wp-admin/edit-tags.php?taxonomy=map&post_type=marker1,5392.3528.9638.85

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/manifold-google-maps/admin/partials/manifold-google-maps-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/manifold-google-maps/public/partials/manifold-google-maps-public-display.php:58
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/manifold-google-maps/public/partials/manifold-google-maps-public-display.php on line 18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/manifold-google-maps/public/partials/manifold-google-maps-public-display.php on line 18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=map&post_type=marker
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: google is not defined" "ReferenceError: google is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/manifold-google-maps/admin/js/manifold-google-maps-admin.js?ver=1.3:106:6)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=map&post_type=marker
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: google is not defined
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: google is not defined" "ReferenceError: google is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/manifold-google-maps/admin/js/manifold-google-maps-admin.js?ver=1.3:106:6)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=marker
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught ReferenceError: google is not defined

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: google maps, maps, multiple maps, markers, multiple markers

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

The primary PHP file in "Manifold Google Maps" version 1.3 is used by WordPress to initiate all plugin functionality
126 characters long description:
The most effortless, valuable and effective google map plugin! Effectively make a boundless number of Google Maps and markers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,255 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32161551,089
PHP12173676727
CSS38632439

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods24.17%
▷ Public methods4389.58%
▷ Protected methods00.00%
▷ Private methods510.42%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
37 PNG files occupy 2.58MB with 1.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/prettyPhoto/default/sprite_x.png1.07KB0.11KB▼ 89.79%
admin/images/default-pin.png3.13KB2.77KB▼ 11.40%
admin/images/prettyPhoto/default/sprite_next.png1.33KB0.39KB▼ 70.69%
admin/images/retro.png194.66KB112.02KB▼ 42.46%
admin/images/prettyPhoto/light_square/sprite.png3.42KB2.13KB▼ 37.67%