83% xml-e-katalog

Code Review | XML for E-Katalog (ek.ua)

WordPress plugin XML for E-Katalog (ek.ua) scored83%from 54 tests.

About plugin

  • Plugin page: xml-e-katalog
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Jan 12, 2021
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: nadavitradesystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.93ms] Passed 4 tests

This is a short check of server-side resources used by XML for E-Katalog (ek.ua)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.65 ▼3.12
Dashboard /wp-admin3.31 ▲0.0048.55 ▼2.23
Posts /wp-admin/edit.php3.36 ▲0.0045.00 ▼3.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.61 ▼11.09
Media Library /wp-admin/upload.php3.23 ▲0.0038.16 ▲4.80

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for XML for E-Katalog (ek.ua)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.43 ▼0.241.74 ▼0.1943.71 ▼6.65
Dashboard /wp-admin2,206 ▲215.87 ▲0.98106.74 ▼9.3141.48 ▼3.75
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0233.37 ▼4.3031.79 ▼1.68
Add New Post /wp-admin/post-new.php1,529 ▲1523.30 ▲5.74687.90 ▲21.3051.94 ▼2.32
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0092.65 ▼4.9546.18 ▲3.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 35× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'EKatWoo\\Services\\GeneratorXML' not found in wp-content/plugins/xml-e-katalog/inc/classes/services/WooGeneratorXML.php:17
    • > PHP Warning
      Use of undefined constant EKATWOO_INC - assumed 'EKATWOO_INC' (this will throw an Error in a future version of PHP) in wp-content/plugins/xml-e-katalog/inc/classes/load.php on line 14
    • > PHP Warning
      include(EKATWOO_INCclasses/services/FileManager.php): failed to open stream: No such file or directory in wp-content/plugins/xml-e-katalog/inc/classes/load.php on line 13
    • > PHP Warning
      include(EKATWOO_INCclasses/services/WooGeneratorXML.php): failed to open stream: No such file or directory in wp-content/plugins/xml-e-katalog/inc/classes/load.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'EKatWoo\\Repositories\\Settings' not found in wp-content/plugins/xml-e-katalog/templates/pages/generate-xml.php:10
    • > PHP Warning
      Use of undefined constant EKATWOO_INC - assumed 'EKATWOO_INC' (this will throw an Error in a future version of PHP) in wp-content/plugins/xml-e-katalog/inc/classes/load.php on line 19
    • > PHP Warning
      Use of undefined constant EKATWOO_INC - assumed 'EKATWOO_INC' (this will throw an Error in a future version of PHP) in wp-content/plugins/xml-e-katalog/inc/classes/load.php on line 17
    • > PHP Warning
      include(EKATWOO_INCclasses/controllers/AbstractController.php): failed to open stream: No such file or directory in wp-content/plugins/xml-e-katalog/inc/classes/load.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/xml-e-katalog/xml-for-ek.php:12
    • > PHP Warning
      include(): Failed opening 'EKATWOO_INCclasses/controllers/GenerateXMLController.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/xml-e-katalog/inc/classes/load.php on line 20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
7 plugin tags: export, woocommerce, e-katalog, ekatalog, xml...

xml-e-katalog/xml-for-ek.php 77% from 13 tests

This is the main PHP file of "XML for E-Katalog (ek.ua)" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 167 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("xml-e-katalog.php" instead of "xml-for-ek.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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
Good job! No executable or dangerous file extensions detected639 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP15202256584
CSS111055

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.78
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods40
▷ Static methods2665.00%
▷ Public methods2767.50%
▷ Protected methods615.00%
▷ Private methods717.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin