72% payzito

Code Review | Payzito ( پِی زیتو )

WordPress plugin Payzito ( پِی زیتو ) scored72%from 54 tests.

About plugin

  • Plugin page: payzito
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 8, 2022
  • Latest release: Sep 23, 2023
  • Number of updates: 51
  • Update frequency: every 6.3 days
  • Top authors: payzito (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

300+ active /2,079 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 gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.73ms] Passed 4 tests

A check of server-side resources used by Payzito ( پِی زیتو )
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.68 ▼2.94
Dashboard /wp-admin3.39 ▲0.0944.21 ▼7.34
Posts /wp-admin/edit.php3.44 ▲0.0945.07 ▼0.74
Add New Post /wp-admin/post-new.php5.97 ▲0.0978.28 ▼11.89
Media Library /wp-admin/upload.php3.32 ▲0.0947.28 ▲13.85
Dashboard /wp-admin/admin.php?page=payzito-panel3.7437.61
Offers /wp-admin/admin.php?page=payzito-offers3.3531.12
Transactions /wp-admin/admin.php?page=payzito-transactions3.3531.37
Forms & Links /wp-admin/admin.php?page=payzito-forms3.3530.61
Users /wp-admin/admin.php?page=payzito-members3.3531.76
Add-ons /wp-admin/admin.php?page=payzito-plugins3.3531.14
Messages /wp-admin/admin.php?page=payzito-messages3.3532.54
Settings /wp-admin/admin.php?page=payzito-configuration3.3529.50
Report /wp-admin/admin.php?page=payzito-reports3.3530.61

Server storage [IO: ▲0.76MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • The plugin illegally modified 2 files (9.12KB) outside of "wp-content/plugins/payzito/" and "wp-content/uploads/"
    • (new file) wp-content/languages/plugins/payzito-en_GB.mo
    • (new file) wp-content/languages/plugins/payzito-en_GB.po
Filesystem: 95 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payzito ( پِی زیتو )
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲9313.33 ▼1.054.15 ▲2.1141.64 ▼6.49
Dashboard /wp-admin2,256 ▲655.89 ▼0.00101.14 ▼7.2375.51 ▲29.90
Posts /wp-admin/edit.php2,142 ▲562.01 ▲0.0235.17 ▼0.3535.46 ▲1.17
Add New Post /wp-admin/post-new.php1,708 ▲17522.50 ▼0.61698.54 ▲24.2451.13 ▼0.77
Media Library /wp-admin/upload.php1,441 ▲534.18 ▼0.03104.11 ▲9.4671.43 ▲28.83
Dashboard /wp-admin/admin.php?page=payzito-panel2,4407.10192.81230.06
Offers /wp-admin/admin.php?page=payzito-offers3,8798.11212.91127.95
Transactions /wp-admin/admin.php?page=payzito-transactions3,2268.40207.83125.66
Forms & Links /wp-admin/admin.php?page=payzito-forms3,3907.75209.62125.78
Users /wp-admin/admin.php?page=payzito-members3,8948.03203.18126.26
Add-ons /wp-admin/admin.php?page=payzito-plugins3,6707.95192.23127.27
Messages /wp-admin/admin.php?page=payzito-messages3,8388.06214.08133.28
Settings /wp-admin/admin.php?page=payzito-configuration3,9508.15206.95127.12
Report /wp-admin/admin.php?page=payzito-reports3,4487.74190.17122.76

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/payzito/repository/libraries/controller.php
    • > /wp-content/plugins/payzito/repository/views/panel.php
    • > /wp-content/plugins/payzito/repository/setup/cms/wordpress/setup.php
    • > /wp-content/plugins/payzito/repository/libraries/helper.php
    • > /wp-content/plugins/payzito/repository/libraries/jdate.php
    • > /wp-content/plugins/payzito/repository/setup/temp.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Loader\\Loader' not found in wp-content/plugins/payzito/repository/libraries/mo-creator/Loader/StrictPoLoader.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'payzitoRepository\\libraries\\controller' not found in wp-content/plugins/payzito/repository/controllers/panel.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Generator\\Generator' not found in wp-content/plugins/payzito/repository/libraries/mo-creator/Generator/PoGenerator.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Gettext\\Generator\\GeneratorInterface' not found in wp-content/plugins/payzito/repository/libraries/mo-creator/Generator/Generator.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Loader\\Loader' not found in wp-content/plugins/payzito/repository/libraries/mo-creator/Loader/PoLoader.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Gettext\\Loader\\LoaderInterface' not found in wp-content/plugins/payzito/repository/libraries/mo-creator/Loader/Loader.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Loader\\Loader' not found in wp-content/plugins/payzito/repository/libraries/mo-creator/Loader/MoLoader.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PASetupParent' not found in wp-content/plugins/payzito/repository/setup/setup.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/payzito/payzito.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Gettext\\Scanner\\ScannerInterface' not found in wp-content/plugins/payzito/repository/libraries/mo-creator/Scanner/Scanner.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=payzito-offers
    • > Network (warning)
    https://cdn.goftino.com/static/socket.io.js 7 WebSocket connection to 'wss://ws.goftino.com/socket.io/?EIO=3&transport=websocket' failed: WebSocket is closed before the connection is established.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

payzito/payzito.php 92% from 13 tests

The entry point to "Payzito ( پِی زیتو )" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please use more than 10 characters for the plugin description (currently 7 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin5,298 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,0902405,023
INI200159
SVG10068
JSON10039
JavaScript5015
CSS4004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity26.97
▷ Minimum class complexity1.00
▷ Maximum class complexity222.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces6
Interfaces5
Traits1
Classes27
▷ Abstract classes414.81%
▷ Concrete classes2385.19%
▷ Final classes730.43%
Methods412
▷ Static methods19146.36%
▷ Public methods34483.50%
▷ Protected methods358.50%
▷ Private methods338.01%
Functions12
▷ Named functions325.00%
▷ Anonymous functions975.00%
Constants27
▷ Global constants414.81%
▷ Class constants2385.19%
▷ Public constants2086.96%

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
8 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
repository/assets/images/ok.png0.54KB0.31KB▼ 42.11%
repository/assets/images/close.png4.55KB1.63KB▼ 64.11%
repository/assets/images/logo/02.png13.15KB0.68KB▼ 94.85%
repository/assets/images/menus/payzito.png13.15KB0.68KB▼ 94.85%
repository/assets/images/logo/01.png11.13KB2.21KB▼ 80.13%