73% ziina

Code Review | Ziina

WordPress plugin Ziina scored73%from 54 tests.

About plugin

  • Plugin page: ziina
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 10, 2023
  • Latest release: Sep 29, 2023
  • Number of updates: 8
  • Update frequency: every 14.8 days
  • Top authors: antondrob2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.91ms] Passed 4 tests

An overview of server-side resources used by Ziina
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.65 ▼3.59
Dashboard /wp-admin3.31 ▼0.0447.33 ▼15.92
Posts /wp-admin/edit.php3.36 ▲0.0046.25 ▲3.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.71 ▼5.79
Media Library /wp-admin/upload.php3.23 ▲0.0034.39 ▲1.67

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Ziina
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.73 ▼0.291.89 ▼0.1341.57 ▼1.65
Dashboard /wp-admin2,203 ▲125.81 ▲0.9299.51 ▼10.7637.20 ▼6.15
Posts /wp-admin/edit.php2,089 ▲32.00 ▲0.0040.15 ▲4.2936.50 ▲1.97
Add New Post /wp-admin/post-new.php1,535 ▲621.13 ▼1.80682.73 ▲39.5055.35 ▼4.07
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0594.64 ▼1.5844.12 ▲1.96

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 650× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WordPressCS\\WordPress\\Sniff' not found in wp-content/plugins/ziina/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/YodaConditionsSniff.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Sniffs\\AbstractScopeSniff' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Core\\AbstractMethodUnitTest' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/tests/Core/File/FindImplementedInterfaceNamesTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/Commenting/TodoUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/AnonClassDeclarationUnitTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Files/LineEndingsSniff.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'PHP_CodeSniffer\\Sniffs\\Sniff' not found in wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Sniffs/Objects/AssignThisSniff.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: gateway, woocommerce, payment, ziina

ziina/index.php 77% from 13 tests

The main file in "Ziina" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ziina.php" instead of "index.php")
  • Requires PHP: Required version must match the one declared in readme.txt ("7.4" instead of "7.2")
  • Requires at least: Required version must match the one declared in readme.txt ("6.0" instead of "4.8")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/bin/phpcbf.bat
      • wp-content/plugins/ziina/vendor/bin/phpcbf.bat
      • wp-content/plugins/ziina/vendor/squizlabs/php_codesniffer/bin/phpcs.bat
      • wp-content/plugins/ziina/vendor/bin/phpcs.bat
97,643 lines of code in 1,243 files:
LanguageFilesBlank linesComment linesLines of code
PHP83420,27835,44480,299
Pascal1303,2317,1186,576
XML1693997145,642
JavaScript577628762,125
Markdown738001,706
CSS3318992665
JSON500390
XSD160130
Bourne Shell3231190
DOS Batch441020

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 478)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity16.58
▷ Minimum class complexity1.00
▷ Maximum class complexity724.00
Average method complexity6.10
▷ Minimum method complexity1.00
▷ Maximum method complexity478.00
Code structure
Namespaces172
Interfaces2
Traits0
Classes683
▷ Abstract classes162.34%
▷ Concrete classes66797.66%
▷ Final classes20.30%
Methods2,106
▷ Static methods914.32%
▷ Public methods1,79585.23%
▷ Protected methods24711.73%
▷ Private methods643.04%
Functions16
▷ Named functions318.75%
▷ Anonymous functions1381.25%
Constants143
▷ Global constants11278.32%
▷ Class constants3121.68%
▷ Public constants31100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin