10% you-n-custom-google-map

Code Review | Map You-n v 1.1

WordPress plugin Map You-n v 1.1 scored10%from 54 tests.

About plugin

  • Plugin page: you-n-custom-goog...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-1.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2013
  • Latest release: Oct 28, 2013
  • Number of updates: 9
  • Update frequency: every 5.1 days
  • Top authors: Agenzia You-n (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /800 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/you-n-custom-google-map/YouMap.php+118
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.93MB] [CPU: ▼59.00ms] Passed 4 tests

Server-side resources used by Map You-n v 1.1
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.02 ▼36.11
Dashboard /wp-admin2.09 ▼1.268.80 ▼52.28
Posts /wp-admin/edit.php2.09 ▼1.277.51 ▼43.78
Add New Post /wp-admin/post-new.php2.09 ▼3.806.51 ▼103.83
Media Library /wp-admin/upload.php2.09 ▼1.155.94 ▼31.99

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Map You-n v 1.1
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.25 ▲0.071.83 ▲0.1138.67 ▼2.31
Dashboard /wp-admin2,191 ▲115.61 ▼0.0686.76 ▲0.1985.36 ▲44.31
Posts /wp-admin/edit.php2,111 ▲112.05 ▲0.0435.91 ▼0.5635.25 ▲0.85
Add New Post /wp-admin/post-new.php1,545 ▼023.11 ▲2.06702.23 ▼13.2967.16 ▲11.26
Media Library /wp-admin/upload.php1,402 ▲54.22 ▲0.0396.52 ▼35.4481.58 ▲27.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/you-n-custom-google-map/YouMap.php+118
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • ym_settings
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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 fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/you-n-custom-google-map/includes/YMFormConfiguration.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/you-n-custom-google-map/YouMap.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/you-n-custom-google-map/includes/YMFormUserConfiguration.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Description of Plugin. screenshot-1.jpg), #2 (Configuration, step 1. screenshot-2.jpg), #3 (Inclusion of the slideshow on a page. screenshot-4.jpg)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === you-n-custom-google-map === )
You can look at the official readme.txt

you-n-custom-google-map/YouMap.php 92% from 13 tests

"Map You-n v 1.1" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("you-n-custom-google-map.php" instead of "YouMap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,643 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript53803931,980
PHP61622481,118
CSS31123364
PO File24545181

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity25.33
▷ Minimum class complexity2.00
▷ Maximum class complexity105.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods4395.56%
▷ Protected methods00.00%
▷ Private methods24.44%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
17 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/width_input.png1.10KB0.24KB▼ 77.98%
images/bg_tooltip.png0.92KB0.09KB▼ 89.76%
images/color_input.png1.18KB0.37KB▼ 68.91%
images/you-n-logo.png5.84KB2.74KB▼ 53.00%
images/you-map-menu-thumb.png1.36KB0.49KB▼ 63.86%