90% nelio-maps

Code Review | Nelio Maps

WordPress plugin Nelio Maps scored90%from 54 tests.

About plugin

  • Plugin page: nelio-maps
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 1, 2019
  • Latest release: Sep 30, 2019
  • Number of updates: 5
  • Update frequency: every 105.2 days
  • Top authors: davilera (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,905 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.23MB] [CPU: ▼19.74ms] Passed 4 tests

Analyzing server-side resources used by Nelio Maps
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.23 ▼3.82
Dashboard /wp-admin3.34 ▲0.0453.45 ▲3.15
Posts /wp-admin/edit.php3.46 ▲0.1051.74 ▼2.09
Add New Post /wp-admin/post-new.php4.85 ▼1.0354.90 ▼76.18
Media Library /wp-admin/upload.php3.26 ▲0.0438.90 ▲4.74
Nelio Maps /wp-admin/options-general.php?page=nelio-maps3.2332.84

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Nelio Maps
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲9513.99 ▼0.5426.21 ▲24.5844.50 ▲4.56
Dashboard /wp-admin2,202 ▲215.59 ▼0.0887.61 ▼18.7339.11 ▼5.18
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0435.67 ▼11.2533.49 ▼5.86
Add New Post /wp-admin/post-new.php1,489 ▼3720.53 ▼2.93718.26 ▲47.1868.13 ▲10.10
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0294.65 ▼10.3540.87 ▼1.52
Nelio Maps /wp-admin/options-general.php?page=nelio-maps7882.0025.7028.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • nelio_maps_api_key_option
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
4 plugin tags: gutenberg, map, block, google maps

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

The primary PHP file in "Nelio Maps" version 1.0.2 is used by WordPress to initiate all plugin functionality
53 characters long description:
Simple and beautiful Google Maps block for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin18,567 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JSON30017,095
JavaScript22250128954
PHP66629184
XML1356140
Sass3320124
Markdown125050
SVG10014
YAML1004
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
packages/blocks/google-map/map-styles/light.png6.27KB3.55KB▼ 43.31%
packages/blocks/google-map/map-styles/default.png15.02KB6.10KB▼ 59.37%
packages/blocks/google-map/map-styles/custom.png0.11KB0.11KB0.00%
packages/blocks/google-map/map-styles/dawn.png7.85KB3.60KB▼ 54.13%
packages/blocks/google-map/map-styles/dark.png6.10KB3.65KB▼ 40.09%