10% wp-yandex-translate

Code Review | Prisna YT - Яндекс Переводчик

WordPress plugin Prisna YT - Яндекс Переводчик scored10%from 54 tests.

About plugin

  • Plugin page: wp-yandex-translate
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: May 24, 2016
  • Latest release: Aug 13, 2023
  • Number of updates: 43
  • Update frequency: every 61.3 days
  • Top authors: Prisna (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /6,471 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-yandex-translate/classes/common.class.php+1134
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.57MB] [CPU: ▼57.22ms] Passed 4 tests

This is a short check of server-side resources used by Prisna YT - Яндекс Переводчик
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.42 ▼1.055.22 ▼34.71
Dashboard /wp-admin2.44 ▼0.877.08 ▼51.04
Posts /wp-admin/edit.php2.44 ▼0.9210.03 ▼40.61
Add New Post /wp-admin/post-new.php2.44 ▼3.456.28 ▼102.53
Media Library /wp-admin/upload.php2.44 ▼0.795.84 ▼28.28
Prisna YT - Yandex Translator /wp-admin/plugins.php?page=prisna-yandex-website-translator-settings2.456.10

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 161 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_prisna-yandex-website-translator
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Prisna YT - Яндекс Переводчик
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.34 ▲0.001.71 ▼0.3340.30 ▲0.23
Dashboard /wp-admin2,206 ▲355.62 ▼0.0392.17 ▼5.0443.32 ▲4.66
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0443.12 ▼1.5437.45 ▼1.05
Add New Post /wp-admin/post-new.php1,529 ▼823.22 ▲5.09626.03 ▼5.4852.80 ▼21.59
Media Library /wp-admin/upload.php1,407 ▲104.22 ▲0.0797.94 ▼6.6042.97 ▼6.24
Prisna YT - Yandex Translator /wp-admin/plugins.php?page=prisna-yandex-website-translator-settings5,5642.6960.99162.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-yandex-translate/classes/common.class.php+1134
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_prisna-yandex-website-translator
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=prisna-yandex-website-translator-settings
    • > Deprecated in wp-content/plugins/wp-yandex-translate/classes/common.class.php+1220
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/plugins.php?page=prisna-yandex-website-translator-settings
    • > Warning in wp-content/plugins/wp-yandex-translate/classes/admin.class.php+345
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

SRP 50% from 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
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-yandex-translate/wp-yandex-translate.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PrisnaYWTItem' not found in wp-content/plugins/wp-yandex-translate/classes/main.class.php:102
    • > PHP Fatal error
      Uncaught Error: Class 'PrisnaYWTItem' not found in wp-content/plugins/wp-yandex-translate/classes/admin.class.php:157
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/wp-yandex-translate/uninstall.php:4
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-yandex-translate/classes/admin.class.php on line 345
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-yandex-translate/classes/common.class.php:790

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
9 plugin tags: yandex translator, -, automatic translation, translation plugin, yandex translate...

wp-yandex-translate/wp-yandex-translate.php 92% from 13 tests

The primary PHP file in "Prisna YT - Яндекс Переводчик" version 1.0.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin7,166 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP71,268722,792
SVG2312,082
JavaScript2267141,056
CSS120511,038
PO File16868198

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.98
▷ Minimum class complexity1.00
▷ Maximum class complexity90.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods224
▷ Static methods10948.66%
▷ Public methods15970.98%
▷ Protected methods6529.02%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants16
▷ Global constants956.25%
▷ Class constants743.75%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/style_dark.png4.15KB2.35KB▼ 43.51%
images/style_light.png3.73KB2.35KB▼ 37.15%
images/fb.png1.30KB1.60KB0.00%
images/tooltip.png0.35KB0.32KB▼ 8.19%
images/tabbed_3.png0.21KB0.14KB▼ 31.13%