89% yamap-block-gutenberg

Code Review | Yandex Maps for Gutenberg

WordPress plugin Yandex Maps for Gutenberg scored89%from 54 tests.

About plugin

  • Plugin page: yamap-block-guten...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Jul 2, 2018
  • Latest release: Dec 8, 2018
  • Number of updates: 7
  • Update frequency: every 22.7 days
  • Top authors: al5dy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /2,746 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.18ms] Passed 4 tests

Analyzing server-side resources used by Yandex Maps for Gutenberg
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.99 ▲1.05
Dashboard /wp-admin3.31 ▲0.0147.04 ▼1.30
Posts /wp-admin/edit.php3.37 ▲0.0149.13 ▼2.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.93 ▼5.40
Media Library /wp-admin/upload.php3.24 ▲0.0136.06 ▲0.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Yandex Maps for Gutenberg: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8123.86 ▲9.51140.17 ▲138.4137.47 ▼8.37
Dashboard /wp-admin2,192 ▲155.51 ▼0.1582.71 ▼3.3536.87 ▼3.40
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0433.65 ▼4.8944.00 ▲6.89
Add New Post /wp-admin/post-new.php6,367 ▲4,83227.64 ▲9.56852.14 ▲224.6952.12 ▼10.16
Media Library /wp-admin/upload.php1,391 ▼124.13 ▼0.0297.22 ▼4.1141.27 ▼7.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

yamap-block-gutenberg/yamap-block-gutenberg.php 92% from 13 tests

The principal PHP file in "Yandex Maps for Gutenberg" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin247 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP15595126
JSON10063
PO File1202956
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of 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.36
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin