78% cadesign-natali

Code Review | Natali - синхронизация каталога

WordPress plugin Natali - синхронизация каталога scored78%from 54 tests.

About plugin

  • Plugin page: cadesign-natali
  • Plugin version: 1.1.18
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Oct 7, 2021
  • Number of updates: 39
  • Update frequency: every 5.6 days
  • Top authors: cadesignteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,521 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Natali - синхронизация каталога
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.57 ▲2.73
Dashboard /wp-admin3.31 ▲0.0043.45 ▼6.20
Posts /wp-admin/edit.php3.36 ▲0.0045.96 ▲2.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.81 ▼10.52
Media Library /wp-admin/upload.php3.23 ▲0.0036.92 ▲2.37

Server storage [IO: ▲0.41MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Natali - синхронизация каталога
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.021.77 ▲0.1443.94 ▲4.09
Dashboard /wp-admin2,192 ▲155.54 ▼0.1287.30 ▼2.3839.68 ▼3.73
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0234.77 ▼1.0735.00 ▼0.95
Add New Post /wp-admin/post-new.php1,526 ▲123.94 ▲0.61693.72 ▲95.0153.92 ▲10.13
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.02108.28 ▼1.0146.70 ▲1.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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 0% 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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cadesign-natali/lib/Pages/SyncCatalog.php
    • > /wp-content/plugins/cadesign-natali/lib/Classes/DeleteProduct.php
    • > /wp-content/plugins/cadesign-natali/vendor/automattic/woocommerce/tests/bootstrap.php
    • > /wp-content/plugins/cadesign-natali/updateNatali.php
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Cadesign\ataliApi\\CategoryList' not found in wp-content/plugins/cadesign-natali/views/import_steps/step1.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cadesign-natali/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/OptionsTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cadesign-natali/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/BasicAuthTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Cadesign\atali\\Assoc' not found in wp-content/plugins/cadesign-natali/views/delete.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cadesign-natali/updateNatali.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'Cadesign\ataliApi\\AbstractProp' not found in wp-content/plugins/cadesign-natali/lib/Classes/ParsedProps/Colors.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cadesign-natali/updateNatali.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cadesign-natali/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/RequestTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Cadesign\ataliApi\\AbstractProp' not found in wp-content/plugins/cadesign-natali/lib/Classes/ParsedProps/Brands.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Cadesign\ataliApi\\AbstractProp' not found in wp-content/plugins/cadesign-natali/lib/Classes/ParsedProps/Sizes.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: cadesign, natali, woocommerce, natali-sync

cadesign-natali/cadesign-natali.php 92% from 13 tests

"Natali - синхронизация каталога" version 1.1.18's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 822 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin10,269 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP701,0141,4615,427
JavaScript11,1853324,591
Markdown1400118
JSON20085
XML21026
YAML26021
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.16
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes55
▷ Abstract classes11.82%
▷ Concrete classes5498.18%
▷ Final classes00.00%
Methods275
▷ Static methods9835.64%
▷ Public methods23184.00%
▷ Protected methods259.09%
▷ Private methods196.91%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants17
▷ Global constants317.65%
▷ Class constants1482.35%
▷ Public constants857.14%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin