78% yamaps

Code Review | YaMaps for WordPress Plugin

WordPress plugin YaMaps for WordPress Plugin scored 78% from 54 tests.

About plugin

  • Plugin page: yamaps
  • Plugin version: 0.6.26
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Feb 7, 2018
  • Latest release: Aug 14, 2023
  • Number of updates: 90
  • Update frequency: every 22.4 days
  • Top authors: yhunter (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

10,000+ active / 116,292 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.48ms] Passed 4 tests

Analyzing server-side resources used by YaMaps for WordPress Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.56 ▼1.83
Dashboard /wp-admin3.44 ▲0.1444.00 ▼5.04
Posts /wp-admin/edit.php3.49 ▲0.1346.86 ▼3.26
Add New Post /wp-admin/post-new.php6.03 ▲0.1495.11 ▼7.78
Media Library /wp-admin/upload.php3.36 ▲0.1335.43 ▲1.71

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for YaMaps for WordPress Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.28 ▼0.911.54 ▼0.2540.76 ▼4.33
Dashboard /wp-admin2,215 ▲244.88 ▼1.02112.21 ▲10.1543.10 ▼1.61
Posts /wp-admin/edit.php2,101 ▲92.05 ▲0.0239.87 ▼1.6636.63 ▲0.27
Add New Post /wp-admin/post-new.php1,529 ▲717.71 ▼5.63602.66 ▼59.8451.46 ▼6.34
Media Library /wp-admin/upload.php1,397 ▲124.15 ▼0.0599.26 ▼0.6543.37 ▲1.41
YaMaps /wp-admin/yamaps-options.php260.440.1214.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yamaps/yamap.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yamaps/options.php:6

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/yamaps-options.php
    • > Network (severe)
    wp-admin/yamaps-options.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Visual shortcode dialog window.), #2 (Shortcode in TinyMCE editor.), #3 (Map on the blog page.), #4 (Shortcode button.), #5 (Visual selecting the marker color.)
Please take inspiration from this readme.txt

yamaps/yamap.php 92% from 13 tests

"YaMaps for WordPress Plugin" version 0.6.26's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yamaps.php" instead of "yamap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,667 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221860730
PHP214192611
PO File16163227
SVG20260
CSS16033
HTML1006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.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
No PNG files were detected