73% persian-woocommerce

Code Review | ووکامرس فارسی

WordPress plugin ووکامرس فارسی scored73%from 54 tests.

About plugin

  • Plugin page: persian-woocommerce
  • Plugin version: 7.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2014
  • Latest release: Nov 11, 2023
  • Number of updates: 134
  • Update frequency: every 26.6 days
  • Top authors: Persianscript (67.16%)mahdiy (17.91%)hannanstd (16.42%)

Code review

54 tests

User reviews

65 reviews

Install metrics

80,000+ active /1,421,172 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by ووکامرس فارسی
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.74 ▼3.86
Dashboard /wp-admin3.31 ▼0.0345.34 ▼16.04
Posts /wp-admin/edit.php3.36 ▲0.0147.94 ▲5.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.73 ▼8.39
Media Library /wp-admin/upload.php3.24 ▲0.0133.21 ▼4.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 335 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ووکامرس فارسی
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.27 ▼0.061.76 ▲0.1236.83 ▼8.11
Dashboard /wp-admin2,195 ▲185.60 ▼0.0589.71 ▼3.1143.60 ▲1.81
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0039.08 ▼0.3636.90 ▲3.99
Add New Post /wp-admin/post-new.php1,526 ▼022.84 ▼0.30595.70 ▼45.2250.53 ▼8.67
Media Library /wp-admin/upload.php1,400 ▲34.20 ▲0.0198.23 ▲5.8640.48 ▼0.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 142× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' not found in wp-content/plugins/persian-woocommerce/vendor/symfony/translation/Catalogue/AbstractOperation.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Assert\\InvalidArgumentException' not found in wp-content/plugins/persian-woocommerce/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Dumper\\DumperInterface' not found in wp-content/plugins/persian-woocommerce/vendor/symfony/translation/Dumper/FileDumper.php:26
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\ObjectInitialisation' not found in wp-content/plugins/persian-woocommerce/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 38
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/persian-woocommerce/vendor/symfony/translation/Dumper/QtFileDumper.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon\\AbstractTranslator' not found in wp-content/plugins/persian-woocommerce/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/persian-woocommerce/vendor/symfony/translation/Loader/QtFileLoader.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/persian-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon\\Exceptions\\UnitException' not found in wp-content/plugins/persian-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/persian-woocommerce/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
7 plugin tags: woocommerce, persian, shamsi, farsi, iran...

persian-woocommerce/woocommerce-persian.php 85% from 13 tests

The main PHP script in "ووکامرس فارسی" version 7.1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 390 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("persian-woocommerce.php" instead of "woocommerce-persian.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/persian-woocommerce/vendor/bin/carbon.bat
      • wp-content/plugins/persian-woocommerce/vendor/nesbot/carbon/bin/carbon.bat
62,248 lines of code in 291 files:
LanguageFilesBlank linesComment linesLines of code
PHP2617,19622,62534,609
PO File19,50117,87620,257
JavaScript334512,809
XSD392482,803
JSON12001,322
CSS2571307
XML35074
YAML2152438
Bourne Shell14612
DOS Batch2009
Bourne Again Shell1008

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity21.19
▷ Minimum class complexity1.00
▷ Maximum class complexity389.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces33
Interfaces29
Traits29
Classes182
▷ Abstract classes179.34%
▷ Concrete classes16590.66%
▷ Final classes159.09%
Methods2,216
▷ Static methods50922.97%
▷ Public methods1,92286.73%
▷ Protected methods1637.36%
▷ Private methods1315.91%
Functions213
▷ Named functions11252.58%
▷ Anonymous functions10147.42%
Constants194
▷ Global constants115.67%
▷ Class constants18394.33%
▷ Public constants18098.36%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/tools.png3.15KB2.31KB▼ 26.68%
assets/images/logo.png1.51KB0.82KB▼ 45.97%
assets/images/icons/bank.png0.90KB0.79KB▼ 12.51%
assets/images/icons/shamsi.png0.58KB0.42KB▼ 27.27%
assets/images/icons/fanum.png1.18KB1.25KB0.00%