89% cbxgooglemap

Code Review | CBX Map for Google Map & OpenStreetMap

WordPress plugin CBX Map for Google Map & OpenStreetMap scored 89% from 54 tests.

About plugin

  • Plugin page: cbxgooglemap
  • Plugin version: 1.1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8
  • WordPress version: 6.3.1
  • First release: Jan 18, 2017
  • Latest release: Sep 6, 2021
  • Number of updates: 44
  • Update frequency: every 38.4 days
  • Top authors: manchumahara (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 11,613 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▲3.60ms] 75% from 4 tests

A check of server-side resources used by CBX Map for Google Map & OpenStreetMap
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,090.26ms on /wp-admin/edit.php?post_type=cbxgooglemap&page=cbxgooglemap-help-support)
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.34 ▲5.20
Dashboard /wp-admin3.42 ▲0.1247.05 ▲0.07
Posts /wp-admin/edit.php3.54 ▲0.1847.08 ▲2.83
Add New Post /wp-admin/post-new.php6.03 ▲0.1496.85 ▲15.08
Media Library /wp-admin/upload.php3.34 ▲0.1240.92 ▲6.30
Setting /wp-admin/edit.php?post_type=cbxgooglemap&page=cbxgooglemapsettings3.3946.84
Maps /wp-admin/edit.php?post_type=cbxgooglemap3.3937.93
Add New /wp-admin/post-new.php?post_type=cbxgooglemap3.4649.25
Helps & Updates /wp-admin/edit.php?post_type=cbxgooglemap&page=cbxgooglemap-help-support5.662,090.26

Server storage [IO: ▲1.01MB] [DB: ▲0.16MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 147 new files
Database: no new tables, 9 new options
New WordPress options
widget_cbxgooglemap-widget
widget_theysaidso_widget
cbxgooglemap_demo
theysaidso_admin_options
widget_recent-comments
cbxgooglemap_general
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by CBX Map for Google Map & OpenStreetMap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲4914.75 ▲0.341.79 ▲0.1042.91 ▼2.80
Dashboard /wp-admin2,241 ▲324.85 ▼0.00107.49 ▲11.3342.59 ▲4.31
Posts /wp-admin/edit.php2,124 ▲351.99 ▼0.0439.04 ▲4.6335.96 ▲2.38
Add New Post /wp-admin/post-new.php6,664 ▲5,13123.66 ▲0.44970.28 ▲299.6561.48 ▲2.27
Media Library /wp-admin/upload.php1,423 ▲324.32 ▲0.0295.25 ▼5.6845.74 ▼3.14
Setting /wp-admin/edit.php?post_type=cbxgooglemap&page=cbxgooglemapsettings1,4084.0163.5957.08
Maps /wp-admin/edit.php?post_type=cbxgooglemap1,1011.9931.8028.91
Add New /wp-admin/post-new.php?post_type=cbxgooglemap1,9574.2480.1043.41
Helps & Updates /wp-admin/edit.php?post_type=cbxgooglemap&page=cbxgooglemap-help-support1,6392.0723.8843.96

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #10, #11, #12, #7, #8, #9 in cbxgooglemap/assets to your readme.txt
You can look at the official readme.txt

cbxgooglemap/cbxgooglemap.php Passed 13 tests

"CBX Map for Google Map & OpenStreetMap" version 1.1.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
Easy responsive embed of google map and openstreet map

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
Good job! No executable or dangerous file extensions detected16,301 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript712,69579110,596
PHP228341,2313,062
CSS1095591,545
Sass519631,036
SVG50462

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity35.33
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods109
▷ Static methods1715.60%
▷ Public methods10192.66%
▷ Protected methods32.75%
▷ Private methods54.59%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
20 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
assets/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.27KB0.14KB▼ 47.84%
assets/img/move.png2.81KB0.13KB▼ 95.49%
assets/css/ui-lightness/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
widgets/elementor-elements/elementor-icon/map.png2.70KB2.95KB0.00%