1C-Bitrix project code audit

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1177
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Code Audit of 1C-Bitrix Project

Project works, but each change becomes a lottery: fix feedback form — shopping cart breaks. New developer spends a week understanding structure. Development speed drops every month. These are symptoms of accumulated technical debt, and code audit — way to measure it, document it, and plan elimination.

What's Checked in Audit

Bitrix project audit significantly differs from arbitrary PHP-app audit. Bitrix imposes its patterns — components, templates, iblocks, agents — and quality criteria tied to them.

Iblock architecture. Iblocks — central data storage in Bitrix. Typical problems:

  • Using one iblock for heterogeneous entities (products and articles in one place)
  • String-type properties instead of "Directory" or "Element Link" — no filtering and relations possible
  • Missing composite indexes on b_iblock_element_property tables for frequently used filters
  • Storing data in PREVIEW_TEXT/DETAIL_TEXT instead of separate properties — loss of structure

Components and templates. Check:

  • Business logic in template.php instead of result_modifier.php or custom component
  • Direct SQL queries via $DB->Query() instead of ORM or iblock API
  • Unused component parameters, copy-paste between templates
  • Third-party component customization via core modification (instead of class.php inheritance)

init.php. File /bitrix/php_interface/init.php — main project health indicator. Bad projects contain thousands of lines: event handlers, functions, classes, SQL queries — all in one file. Good projects — only autoloader include and handler registration.

Query performance. Enable $DB->ShowSQLStat = true and analyze SQL queries per page. Normal: 30-80 queries. Problem: 300+ queries from N+1 problem: calling CIBlockElement::GetList() in loop.

Audit Result

Report contains not abstract recommendations, but specific list:

Problem File/Module Severity Recommendation
SQL in component template /bitrix/templates/main/components/.../template.php:45 High Move to result_modifier.php, use CIBlockElement::GetList()
N+1 on property fetching Component catalog.section (custom) High Use GetNextElement() with PROPERTY_* in $arSelect
init.php 2000+ lines /bitrix/php_interface/init.php Medium Decompose to modules, include via autoloader

Severity determined by performance impact, security, and support cost. Report prioritized — top items fixed first.

Tools

  • phpstan / psalm — static analysis, detecting calls to non-existent methods and properties
  • PHP_CodeSniffer — code standard compliance check
  • Bitrix "Performance Monitor" (perfmon) — SQL and PHP profiling
  • Xdebug + Cachegrind — detailed profiling for bottleneck detection

Audit takes 2-3 business days for medium project. Output — document for planning refactoring with clear priorities and effort estimates.