77% snapycode-gmap

Code Review | Snapycode Gmap

WordPress plugin Snapycode Gmap scored77%from 54 tests.

About plugin

  • Plugin page: snapycode-gmap
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8
  • WordPress version: 6.3.1
  • First release: Mar 12, 2014
  • Latest release: Mar 12, 2014
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: snapycode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,055 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.37ms] Passed 4 tests

An overview of server-side resources used by Snapycode Gmap
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.74 ▼7.75
Dashboard /wp-admin3.36 ▲0.0150.71 ▼15.22
Posts /wp-admin/edit.php3.41 ▲0.0550.41 ▼1.00
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.65 ▼1.49
Media Library /wp-admin/upload.php3.28 ▲0.0539.75 ▲1.28

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 705 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_snapycode_gmap

Browser metrics Passed 4 tests

Checking browser requirements for Snapycode Gmap
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.38 ▲0.031.60 ▼0.1142.96 ▼2.41
Dashboard /wp-admin2,192 ▲155.67 ▲0.0990.31 ▲1.2738.95 ▼5.70
Posts /wp-admin/edit.php2,100 ▼02.08 ▲0.0738.81 ▲2.0232.89 ▼4.93
Add New Post /wp-admin/post-new.php1,528 ▲223.34 ▼0.26689.11 ▲51.5050.99 ▼1.26
Media Library /wp-admin/upload.php1,400 ▲34.17 ▲0.0698.91 ▼9.8440.38 ▼5.40

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_snapycode_gmap
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/snapycode-gmap/map.php
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snapycode-gmap/map.php on line 125
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/snapycode-gmap/map.php on line 30
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/snapycode-gmap/map.php on line 125
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snapycode-gmap/map.php on line 132
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snapycode-gmap/map.php on line 37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snapycode-gmap/map.php on line 30
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/snapycode-gmap/map.php on line 133
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snapycode-gmap/map.php on line 37
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/snapycode-gmap/map.php on line 132
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/snapycode-gmap/map.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Screenshot #1 (Google map for wordpress by snapycode.) image not found
You can look at the official readme.txt

snapycode-gmap/snapycode_gmap.php 92% from 13 tests

The entry point to "Snapycode Gmap" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("snapycode-gmap.php" instead of "snapycode_gmap.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
Everything looks great! No dangerous files found in this plugin340 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28646294
CSS12045
HTML1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity7.33
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
698 PNG files occupy 0.88MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/map-markers/mushroom.png1.33KB0.94KB▼ 28.97%
images/map-markers/weights.png1.08KB0.71KB▼ 34.30%
images/map-markers/poweroutage.png1.04KB0.63KB▼ 39.33%
images/map-markers/amphitheater-2.png1.23KB0.67KB▼ 45.49%
images/map-markers/ufo.png1.19KB0.78KB▼ 34.48%