89% gis-maps

Code Review | Gis maps

WordPress plugin Gis maps scored 89% from 54 tests.

About plugin

  • Plugin page: gis-maps
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Oct 25, 2016
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: garprogram (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 3,912 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.43ms] Passed 4 tests

A check of server-side resources used by Gis maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.94 ▲1.02
Dashboard /wp-admin3.39 ▲0.0948.60 ▼2.52
Posts /wp-admin/edit.php3.45 ▲0.0950.03 ▲4.26
Add New Post /wp-admin/post-new.php5.97 ▲0.0992.35 ▼2.79
Media Library /wp-admin/upload.php3.31 ▲0.0934.73 ▼5.42
Add New /wp-admin/post-new.php?post_type=ptgismap3.4654.37
All gis maps /wp-admin/edit.php?post_type=ptgismap3.4243.27
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=ptgismap3.3132.45
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=ptgismap3.3136.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
category_children
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gis maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.21 ▼1.064.18 ▲1.9543.12 ▼7.32
Dashboard /wp-admin2,238 ▲504.83 ▼1.05103.38 ▼12.1241.75 ▼6.79
Posts /wp-admin/edit.php2,124 ▲352.02 ▼0.0333.21 ▼3.0735.87 ▼1.45
Add New Post /wp-admin/post-new.php1,563 ▲4923.22 ▲5.67626.87 ▼12.1254.32 ▲2.47
Media Library /wp-admin/upload.php1,423 ▲354.16 ▼0.0393.89 ▼19.3539.63 ▼10.24
Add New /wp-admin/post-new.php?post_type=ptgismap2,5867.78194.6268.81
All gis maps /wp-admin/edit.php?post_type=ptgismap1,8492.0235.3130.14
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=ptgismap1,3392.1328.4928.27
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=ptgismap1,4782.1427.1230.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • category_children

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

gis-maps/gismaps.php 92% from 13 tests

The primary PHP file in "Gis maps" version 0.3.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gis-maps.php" instead of "gismaps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,908 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript8891001,523
PHP22813221
CSS3230122
HTML10042

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
gismaps_maps/openlayers-example/resources/measure-control.png14.35KB0.42KB▼ 97.09%