94% yandex-map

Code Review | Yandex Map

WordPress plugin Yandex Map scored 94% from 54 tests.

About plugin

  • Plugin page: yandex-map
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.8
  • WordPress version: 5.8.1
  • First release: Aug 21, 2021
  • Latest release: Aug 27, 2021
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: glboy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 82 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼141.37ms] Passed 4 tests

Analyzing server-side resources used by Yandex Map
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0536.05 ▲1.16
Dashboard /wp-admin3.13 ▲0.0748.50 ▼1.73
Posts /wp-admin/edit.php3.18 ▲0.0748.67 ▼1.27
Add New Post /wp-admin/post-new.php5.48 ▲0.0597.50 ▼563.63
Media Library /wp-admin/upload.php3.07 ▲0.0636.50 ▲1.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yandex Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,765 ▲16926.62 ▲10.75135.68 ▲126.8852.75 ▲1.04
Dashboard /wp-admin3,017 ▲8318.83 ▲12.89287.07 ▲139.10116.56 ▼1.53
Posts /wp-admin/edit.php2,775 ▲3614.41 ▲11.72205.34 ▲134.85128.10 ▲32.73
Add New Post /wp-admin/post-new.php2,546 ▲86327.54 ▲8.78576.29 ▲158.56134.24 ▲17.51
Media Library /wp-admin/upload.php1,858 ▲4816.64 ▲11.64302.37 ▲144.94127.72 ▲7.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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 fix 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/yandex-map/yandex-map.php:19

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
There were not plugin tags detected

yandex-map/yandex-map.php Passed 13 tests

The main PHP script in "Yandex Map" version 1.0.2 is automatically included on every request by WordPress
35 characters long description:
yandex map for woocommerce checkout

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
There were no executable files found in this plugin591 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS22418284
PHP27027205
JavaScript2193183
Markdown111019

PHP code Passed 2 tests

A short review 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.25
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/loc_icon.png5.59KB2.88KB▼ 48.61%