84% styled-google-maps-block

Code Review | Styled Google Maps Block

WordPress plugin Styled Google Maps Block scored 84% from 54 tests.

About plugin

  • Plugin page: styled-google-map...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2023
  • Latest release: Jan 11, 2023
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: danielshawellis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.10ms] Passed 4 tests

An overview of server-side resources used by Styled Google Maps Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.62 ▼4.70
Dashboard /wp-admin3.33 ▲0.0345.62 ▼6.44
Posts /wp-admin/edit.php3.38 ▲0.0347.78 ▲3.90
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.34 ▼19.41
Media Library /wp-admin/upload.php3.25 ▲0.0338.21 ▲2.14

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Styled Google Maps Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.28 ▼1.121.77 ▼0.0641.61 ▼2.76
Dashboard /wp-admin2,203 ▲155.77 ▲0.8997.50 ▼11.7040.15 ▼6.37
Posts /wp-admin/edit.php2,086 ▼62.02 ▲0.0134.11 ▼6.8633.48 ▼0.42
Add New Post /wp-admin/post-new.php6,596 ▲5,06023.99 ▲0.90845.47 ▲214.0260.71 ▲7.75
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0297.58 ▼4.0243.51 ▼0.78

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/styled-google-maps-block/styled-google-maps-block.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: directions, google maps, theme, street view, styled...

styled-google-maps-block/styled-google-maps-block.php Passed 13 tests

The principal PHP file in "Styled Google Maps Block" v. 1.0.2 is loaded by WordPress automatically on each request
113 characters long description:
A highly-customizable Google Maps block. Supports custom themes, navigational directions, and Google Street View.

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
Good job! No executable or dangerous file extensions detected30,630 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JSON100029,539
TypeScript1555491,077
PHP31196
Sass2006
JavaScript2002
CSS1100

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/images/silver.png3.04KB2.98KB▼ 1.80%
build/images/aubergine.81c1a402.png3.44KB3.30KB▼ 4.01%
build/images/standard.17a8ee34.png4.60KB4.46KB▼ 2.99%
build/images/silver.45cc337c.png3.04KB2.98KB▼ 1.80%
src/images/night.png3.06KB3.00KB▼ 2.04%