84% metronet-google-maps

Code Review | Metronet Google Maps

WordPress plugin Metronet Google Maps scored84%from 54 tests.

About plugin

  • Plugin page: metronet-google-maps
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 22, 2013
  • Latest release: May 22, 2013
  • Number of updates: 9
  • Update frequency: every 0.7 days
  • Top authors: ojdavey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Metronet Google Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.49 ▼1.10
Dashboard /wp-admin3.35 ▲0.0449.85 ▼2.56
Posts /wp-admin/edit.php3.40 ▲0.0445.35 ▼5.35
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.20 ▼3.54
Media Library /wp-admin/upload.php3.27 ▲0.0440.33 ▲0.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Metronet Google Maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.75 ▼0.041.76 ▼0.0141.87 ▼2.51
Dashboard /wp-admin2,209 ▲175.85 ▼0.08110.30 ▼0.1071.82 ▲26.08
Posts /wp-admin/edit.php2,107 ▲182.01 ▼0.0534.58 ▼0.9033.11 ▼2.52
Add New Post /wp-admin/post-new.php1,680 ▲16621.97 ▲4.29676.15 ▼22.3056.31 ▼0.69
Media Library /wp-admin/upload.php1,403 ▲184.22 ▲0.03109.30 ▲12.3479.82 ▲34.37

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/metronet-google-maps/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Once you've saved your map, click "Get shortcode" to get the code that needs to be pasted where you want), #2 (Select a title, width, height for your map and create as many markers as you like.), #3 (You can use the helpful latitude and longitude finder to get the appropriate values for your address. You can), #4 (Voila! After pasting the shortcode into your content, you have a Google map that is bounded to your markers.)
The official readme.txt is a good inspiration

metronet-google-maps/index.php 92% from 13 tests

This is the main PHP file of "Metronet Google Maps" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("metronet-google-maps.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin912 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP271168448
JavaScript1467260
CSS1287204

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
8 PNG files occupy 0.20MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
metronet-icon-small.png1.92KB0.47KB▼ 75.45%
screenshot-4.png103.44KB35.95KB▼ 65.24%
screenshot-3.png44.74KB12.97KB▼ 71.01%
images/white-grad-active.png0.22KB0.18KB▼ 17.49%
screenshot-2.png32.83KB8.28KB▼ 74.77%