68% google-map-tab

Code Review | Google Map Tab

WordPress plugin Google Map Tab scored68%from 54 tests.

About plugin

  • Plugin page: google-map-tab
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Jul 16, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: isaiaswebnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,345 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.90ms] Passed 4 tests

This is a short check of server-side resources used by Google Map Tab
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.16 ▲1.56
Dashboard /wp-admin3.36 ▲0.0647.99 ▼7.90
Posts /wp-admin/edit.php3.41 ▲0.0651.34 ▲1.59
Add New Post /wp-admin/post-new.php5.96 ▲0.0897.07 ▼7.54
Media Library /wp-admin/upload.php3.28 ▲0.0632.75 ▼1.73
List /wp-admin/admin.php?page=list3.2629.20
Add /wp-admin/admin.php?page=add3.2933.24
Settings /wp-admin/admin.php?page=settings3.2732.66

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: 1 new table, 8 new options
New tables
wp_gmt_tab
New WordPress options
db_upgraded
recovery_mode_email_last_sent
widget_recent-comments
widget_theysaidso_widget
db_table_version
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Map Tab
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12113.80 ▼0.7725.56 ▲23.7042.78 ▲2.05
Dashboard /wp-admin2,219 ▲425.60 ▼0.0386.13 ▼5.4266.70 ▲21.20
Posts /wp-admin/edit.php2,136 ▲362.01 ▲0.0138.23 ▲1.4334.91 ▼2.22
Add New Post /wp-admin/post-new.php1,571 ▲4524.75 ▲1.28668.79 ▼32.3261.66 ▲1.30
Media Library /wp-admin/upload.php1,430 ▲304.25 ▲0.01108.41 ▲3.8881.22 ▲35.72
List /wp-admin/admin.php?page=list7591.516.5019.52
Add /wp-admin/admin.php?page=add1,4122.1324.0627.06
Settings /wp-admin/admin.php?page=settings1,0571.7428.8930.30

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
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_gmt_tab
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • theysaidso_admin_options
    • db_table_version
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=list
    • > Error in wp-content/plugins/google-map-tab/inc/list.php+75
    Uncaught Error: Call to undefined function mysql_affected_rows() in wp-content/plugins/google-map-tab/inc/list.php:75
    Stack trace:
    #0 wp-content/plugins/google-map-tab/google-map-tab.php(82): require_once()
    #1 wp-includes/class-wp-hook.php(310): wp_list()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=add
    • > Notice in wp-content/plugins/google-map-tab/inc/add.php+21
    Undefined index: submit
    • > GET request to /wp-admin/admin.php?page=add
    • > Notice in wp-content/plugins/google-map-tab/inc/add.php+76
    Undefined variable: id
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add
    • > Notice in wp-content/plugins/google-map-tab/inc/add.php+166
    Undefined variable: class_equired
    • > GET request to /wp-admin/admin.php?page=settings
    • > Notice in wp-content/plugins/google-map-tab/inc/settings.php+7
    Undefined index: settings-updated

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
Almost there! Just fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/google-map-tab/inc/add.php on line 76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/google-map-tab/inc/gmt-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/google-map-tab/inc/list.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/google-map-tab/inc/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-map-tab/inc/shortcode.php:2
    • > PHP Notice
      Undefined index: submit in wp-content/plugins/google-map-tab/inc/add.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-map-tab/inc/db-settings.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-map-tab/inc/db-settings.php:50
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/google-map-tab/inc/add.php:77
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/google-map-tab/inc/add.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: map, api, jquery-tabs, editor, tabs...

google-map-tab/google-map-tab.php 92% from 13 tests

This is the main PHP file of "Google Map Tab" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 206 characters long)

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 plugin1,595 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript414047877
PHP77837590
PO File15663127
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/js/images/hv.png2.80KB7.32KB0.00%
inc/js/images/hs.png2.62KB7.54KB0.00%
inc/js/images/gmt-icon.png55.28KB1.24KB▼ 97.76%