84% brikshya-map

Code Review | Brikshya Map

WordPress plugin Brikshya Map scored84%from 54 tests.

About plugin

  • Plugin page: brikshya-map
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2019
  • Latest release: Apr 2, 2019
  • Number of updates: 8
  • Update frequency: every 5.1 days
  • Top authors: brikshyatechnologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.27MB] [CPU: ▼5.77ms] Passed 4 tests

A check of server-side resources used by Brikshya Map
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2538.24 ▼5.91
Dashboard /wp-admin3.62 ▲0.3147.37 ▼0.15
Posts /wp-admin/edit.php3.67 ▲0.3147.71 ▲2.21
Add New Post /wp-admin/post-new.php6.15 ▲0.2784.98 ▼19.21
Media Library /wp-admin/upload.php3.48 ▲0.2537.67 ▲4.80
Map API key /wp-admin/admin.php?page=settings3.4432.25
Brikshya Map /wp-admin/admin.php?page=map3.4533.81
Add Marker /wp-admin/admin.php?page=marker3.4533.22

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 47 new files
Database: 2 new tables, 6 new options
New tables
wp_brikshya_map_table
wp_brikshya_map_marker
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Brikshya Map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲14713.90 ▼0.688.07 ▲6.1141.99 ▲1.63
Dashboard /wp-admin2,241 ▲565.87 ▲0.95102.99 ▼0.7529.54 ▼8.70
Posts /wp-admin/edit.php2,124 ▲352.04 ▲0.0740.42 ▼0.6631.89 ▼4.71
Add New Post /wp-admin/post-new.php1,547 ▲1423.06 ▼0.15678.66 ▲18.4357.62 ▲4.07
Media Library /wp-admin/upload.php1,426 ▲384.20 ▼0.0098.09 ▼4.9741.03 ▼2.61
Map API key /wp-admin/admin.php?page=settings8052.0425.2420.62
Brikshya Map /wp-admin/admin.php?page=map9322.0626.1422.19
Add Marker /wp-admin/admin.php?page=marker9212.0625.6921.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 31× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/brikshya-map/admin/partials/index.php
    • > /wp-content/plugins/brikshya-map/admin/partials/marker-delete.php
    • > /wp-content/plugins/brikshya-map/includes/class-brikshya-map-deactivator.php
    • > /wp-content/plugins/brikshya-map/admin/class-brikshya-map-admin.php
    • > /wp-content/plugins/brikshya-map/public/partials/brikshya-map-public-display.php
    • > /wp-content/plugins/brikshya-map/admin/partials/map-single.php
    • > /wp-content/plugins/brikshya-map/admin/partials/map-new.php
    • > /wp-content/plugins/brikshya-map/public/BKTMP_public_functions.php
    • > /wp-content/plugins/brikshya-map/admin/class-form-handler.php
    • > /wp-content/plugins/brikshya-map/admin/partials/marker-list.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: Add images for these screenshots: #1 (After Installing the plugin the error message will be shown with the link to save the google map API key), #2 (User can save the google map API key.), #3 (After Map Marker is added the list will be shown as bellow), #4 (Page to add new Map, users need to set the map center point then on clicking on the map new marker will be added ... The icon for marker can be selected at the bottom of the page.), #5 (Multiple Map can be registered and can be added with the sortcode.)
You can take inspiration from this readme.txt

brikshya-map/brikshya-map.php Passed 13 tests

The main PHP script in "Brikshya Map" version 1.0.1 is automatically included on every request by WordPress
104 characters long description:
This plugin is developed to add google map easily on website. with sortcode user can add the google map.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,576 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP284947442,458
CSS22511103
JavaScript265415

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.27
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods58
▷ Static methods23.45%
▷ Public methods5187.93%
▷ Protected methods00.00%
▷ Private methods712.07%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/orange_marker.png1.36KB1.31KB▼ 3.80%
includes/screenshot3.png36.79KB9.42KB▼ 74.41%
includes/screenshot1.png34.09KB8.96KB▼ 73.73%
assets/brikshya-map-icon.png12.63KB5.11KB▼ 59.57%
includes/screenshot4.png28.63KB7.18KB▼ 74.92%