84% fx-maps

Code Review | f(x) Maps

WordPress plugin f(x) Maps scored84%from 54 tests.

About plugin

  • Plugin page: fx-maps
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Dec 3, 2016
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: turtlepod (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,158 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by f(x) Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.96 ▲2.56
Dashboard /wp-admin3.34 ▲0.0350.52 ▼4.30
Posts /wp-admin/edit.php3.39 ▲0.0350.46 ▲2.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.46 ▼6.19
Media Library /wp-admin/upload.php3.26 ▲0.0340.22 ▲2.61
Maps /wp-admin/options-general.php?page=fx-maps3.2441.33

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
fx-maps_welcome
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

f(x) Maps: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.72 ▲0.131.67 ▼0.1444.62 ▼0.64
Dashboard /wp-admin2,214 ▲345.58 ▼0.1497.60 ▲0.7045.67 ▼0.54
Posts /wp-admin/edit.php2,120 ▲202.00 ▼0.0335.22 ▼1.6635.92 ▼2.40
Add New Post /wp-admin/post-new.php1,542 ▲1623.29 ▲0.39688.06 ▼35.9659.76 ▲5.61
Media Library /wp-admin/upload.php1,410 ▲104.19 ▲0.04103.79 ▼9.5043.99 ▼1.72
Maps /wp-admin/options-general.php?page=fx-maps1,6416.56147.41118.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=fx-maps
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&ver=3.exp 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/options-general.php?page=fx-maps
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&ver=3.exp 164:311 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: maps, location, google maps, locations

fx-maps/fx-maps.php Passed 13 tests

Analyzing the main PHP file in "f(x) Maps" version 1.0.0
63 characters long description:
Simple way to display your business location using Google Maps.

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
Everything looks great! No dangerous files found in this plugin673 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP10124249434
JavaScript33976181
CSS311245
Markdown14013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.50
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods313.04%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants10
▷ Global constants10100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/settings/assets/fx-gmaps/mylocation.png3.30KB1.96KB▼ 40.66%