77% lite-google-map

Code Review | Lite Google Map

WordPress plugin Lite Google Map scored77%from 54 tests.

About plugin

  • Plugin page: lite-google-map
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Sep 6, 2017
  • Latest release: Mar 1, 2018
  • Number of updates: 58
  • Update frequency: every 3.1 days
  • Top authors: rafiul17 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /851 total downloads

Benchmarks

Plugin footprint 82% 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.55MB] [CPU: ▼1.80ms] Passed 4 tests

This is a short check of server-side resources used by Lite Google Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3747.04 ▲2.84
Dashboard /wp-admin3.92 ▲0.6254.68 ▲0.04
Posts /wp-admin/edit.php3.94 ▲0.5852.00 ▼7.26
Add New Post /wp-admin/post-new.php6.51 ▲0.6290.02 ▼2.80
Media Library /wp-admin/upload.php3.84 ▲0.6147.49 ▲14.31

Server storage [IO: ▲3.00MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Just a few items left to fix
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/lite-google-map/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 368 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Lite Google Map
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11814.08 ▼0.4822.29 ▲20.4842.26 ▼6.62
Dashboard /wp-admin2,253 ▲504.94 ▼0.86108.17 ▼9.5142.88 ▼5.39
Posts /wp-admin/edit.php2,132 ▲322.09 ▲0.0639.58 ▲4.7533.98 ▼3.08
Add New Post /wp-admin/post-new.php1,551 ▲523.39 ▲0.46667.04 ▼2.8565.95 ▲12.20
Media Library /wp-admin/upload.php1,429 ▲294.26 ▲0.07106.33 ▲2.1045.99 ▼4.60

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • 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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lite-google-map/themes/silver.php
    • > /wp-content/plugins/lite-google-map/themes/dark-blue.php
    • > /wp-content/plugins/lite-google-map/themes/gray.php
    • > /wp-content/plugins/lite-google-map/themes/hue.php
    • > /wp-content/plugins/lite-google-map/themes/blue.php
    • > /wp-content/plugins/lite-google-map/themes/gray-blue.php
    • > /wp-content/plugins/lite-google-map/themes/night.php
    • > /wp-content/plugins/lite-google-map/themes/green.php
    • > /wp-content/plugins/lite-google-map/themes/dark.php
  • 42× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lite-google-map/inc/lib/switch/switch_metafield.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_hookup' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/helper-functions.php:127
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/lite-google-map/inc/helper/cmb2/includes/types/CMB2_Type_Title.php:13

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in lite-google-map/assets to your readme.txt
You can take inspiration from this readme.txt

lite-google-map/init.php 85% from 13 tests

"Lite Google Map" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lite-google-map.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected45,264 lines of code in 210 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78217,88231,544
PHP681,9365,3877,655
CSS141,1331,1715,105
JavaScript7247775942
Markdown14018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity17.06
▷ Minimum class complexity1.00
▷ Maximum class complexity175.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes811.59%
▷ Concrete classes6188.41%
▷ Final classes00.00%
Methods502
▷ Static methods7314.54%
▷ Public methods41682.87%
▷ Protected methods8316.53%
▷ Private methods30.60%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants330.00%
▷ Class constants770.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
26 PNG files occupy 0.42MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/helper/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
inc/helper/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
inc/theme-img/orange.png1.42KB0.95KB▼ 33.33%
inc/helper/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
inc/theme-img/blue.png58.09KB1.97KB▼ 96.60%