78% tcd-google-maps

Code Review | TCD Google Maps

WordPress plugin TCD Google Maps scored78%from 54 tests.

About plugin

  • Plugin page: tcd-google-maps
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Feb 5, 2016
  • Latest release: Mar 29, 2022
  • Number of updates: 24
  • Update frequency: every 93.5 days
  • Top authors: DesignPlus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /77,755 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.06MB] [CPU: ▼4.23ms] Passed 4 tests

A check of server-side resources used by TCD Google Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0647.61 ▼4.35
Dashboard /wp-admin3.37 ▲0.0649.47 ▼0.81
Posts /wp-admin/edit.php3.42 ▲0.0648.69 ▼3.15
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.54 ▼8.61
Media Library /wp-admin/upload.php3.29 ▲0.0637.52 ▲4.15

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for TCD Google Maps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.28 ▲0.011.76 ▼0.4746.91 ▼0.09
Dashboard /wp-admin2,205 ▲255.54 ▼0.1390.88 ▲2.1638.80 ▼5.99
Posts /wp-admin/edit.php2,116 ▲161.96 ▼0.0739.70 ▼0.4135.24 ▼2.54
Add New Post /wp-admin/post-new.php1,539 ▲1023.31 ▲0.26652.37 ▼4.3260.79 ▲10.45
Media Library /wp-admin/upload.php1,416 ▲194.18 ▼0.12106.29 ▲1.3844.10 ▲0.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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)
Even though no errors were found, 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tcd-google-maps/gmaps-options.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tcd-google-maps/gmaps-options.php:202
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tcd-google-maps/design-plus-google-maps.php:46

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (TCD Google Maps Settings), #2 (Google Maps Api Key), #3 (New Styles)
The official readme.txt is a good inspiration

tcd-google-maps/design-plus-google-maps.php 92% from 13 tests

The entry point to "TCD Google Maps" version 1.8 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tcd-google-maps.php" instead of "design-plus-google-maps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin616 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP29025480
PO File1252578
CSS25557
JavaScript202951

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
22 compressed PNG files occupy 1.27MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/greyscale.png62.75KB53.80KB▼ 14.26%
img/elevation.png55.66KB49.40KB▼ 11.24%
img/red-hat-antwerp.png59.39KB50.46KB▼ 15.04%
img/light-gray.png64.47KB55.62KB▼ 13.74%
img/even-lighter.png41.93KB34.29KB▼ 18.21%