78% xml-for-o-yandex

Code Review | XML for O.Yandex (Яндекс Объявления)

WordPress plugin XML for O.Yandex (Яндекс Объявления) scored78%from 54 tests.

About plugin

  • Plugin page: xml-for-o-yandex
  • Plugin version: 2.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2020
  • Latest release: Jul 6, 2023
  • Number of updates: 20
  • Update frequency: every 47.0 days
  • Top authors: icopydoc (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /1,658 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.57MB] [CPU: ▲0.86ms] 75% from 4 tests

Analyzing server-side resources used by XML for O.Yandex (Яндекс Объявления)
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 940.45ms on /wp-admin/admin.php?page=xfoyextensions)
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4437.88 ▲0.47
Dashboard /wp-admin3.92 ▲0.6149.62 ▼3.61
Posts /wp-admin/edit.php4.04 ▲0.6752.34 ▲7.77
Add New Post /wp-admin/post-new.php6.50 ▲0.6195.24 ▼1.19
Media Library /wp-admin/upload.php3.85 ▲0.6142.35 ▲9.23
Экспорт на Яндекс Объявления /wp-admin/admin.php?page=xfoyexport3.8136.07
Страница отладки /wp-admin/admin.php?page=xfoydebug3.83496.35
Расширения /wp-admin/admin.php?page=xfoyextensions3.87940.45

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 14 new options
New WordPress options
xfoy_keeplogs
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
xfoy_enable_five_min
can_compress_scripts
xfoy_settings_arr
xfoy_disable_notices
xfoy_registered_feeds_arr
widget_recent-posts
...

Browser metrics Passed 4 tests

XML for O.Yandex (Яндекс Объявления): an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.39 ▼0.141.67 ▼0.0139.11 ▼4.57
Dashboard /wp-admin2,236 ▲655.63 ▼0.0389.95 ▼10.7645.82 ▲0.57
Posts /wp-admin/edit.php2,144 ▲442.05 ▲0.0940.18 ▲4.9738.41 ▲5.74
Add New Post /wp-admin/post-new.php1,566 ▲4018.25 ▼4.83607.89 ▼71.1763.60 ▲7.30
Media Library /wp-admin/upload.php1,441 ▲384.20 ▲0.0495.58 ▲0.9942.79 ▼4.22
Экспорт на Яндекс Объявления /wp-admin/admin.php?page=xfoyexport1,7931.8125.5638.03
Страница отладки /wp-admin/admin.php?page=xfoydebug9411.126.3024.00
Расширения /wp-admin/admin.php?page=xfoyextensions8922.1725.7940.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=xfoydebug
    • > Error in wp-content/plugins/xml-for-o-yandex/functions.php+983
    Uncaught Error: Call to undefined function wc_get_attribute_taxonomies() in wp-content/plugins/xml-for-o-yandex/functions.php:983
    Stack trace:
    #0 wp-content/plugins/xml-for-o-yandex/debug.php(146): xfoy_possible_problems_list()
    #1 wp-includes/class-wp-hook.php(310): xfoy_debug_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/xml-for-o-yandex/includes/class_wp_list_table.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
The official readme.txt is a good inspiration

xml-for-o-yandex/xml-for-o-yandex.php Passed 13 tests

"XML for O.Yandex (Яндекс Объявления)" version 2.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
129 characters long description:
Подключите свой магазин к Яндекс Объявлениям чтобы увеличить продажи!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin6,534 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
XML1003,516
PHP81734402,579
PO File15341,094408
CSS10131

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity44.50
▷ Minimum class complexity15.00
▷ Maximum class complexity74.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1237.50%
▷ Public methods3196.88%
▷ Protected methods00.00%
▷ Private methods13.12%
Functions35
▷ Named functions3497.14%
▷ Anonymous functions12.86%
Constants9
▷ Global constants9100.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.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png72.26KB28.10KB▼ 61.11%