78% kata-plus

Code Review | Kata Plus

WordPress plugin Kata Plus scored 78% from 54 tests.

About plugin

  • Plugin page: kata-plus
  • Plugin version: 1.2.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Dec 4, 2020
  • Latest release: Jun 17, 2023
  • Number of updates: 67
  • Update frequency: every 13.8 days
  • Top authors: climaxthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 17,270 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.86ms] Passed 4 tests

An overview of server-side resources used by Kata Plus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.26 ▼1.84
Dashboard /wp-admin3.36 ▲0.0649.54 ▲4.09
Posts /wp-admin/edit.php3.41 ▲0.0550.83 ▲5.53
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.90 ▼12.49
Media Library /wp-admin/upload.php3.28 ▲0.0532.84 ▼1.18

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3,798 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Kata Plus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.16 ▼1.221.65 ▼0.1741.89 ▼2.46
Dashboard /wp-admin2,206 ▲155.81 ▼0.0999.19 ▼2.5739.48 ▼4.16
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0138.70 ▲4.3536.19 ▲0.48
Add New Post /wp-admin/post-new.php1,533 ▼023.20 ▼0.00669.64 ▼29.6558.82 ▲4.04
Media Library /wp-admin/upload.php1,388 ▼34.23 ▼0.0195.04 ▼6.1541.12 ▼0.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/kata-plus/includes/meta-box/meta-box-plugin/inc/templates/audio.php
    • > /wp-content/plugins/kata-plus/includes/theme-options/plugins/wps-menu-exporter/wps-menu-exporter.php
    • > /wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/examples/multiple.php
    • > /wp-content/plugins/kata-plus/includes/meta-box/meta-box-plugin/inc/templates/media.php
    • > /wp-content/plugins/kata-plus/includes/meta-box/meta-box-plugin/inc/templates/upload.php
    • > /wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/examples/session.php
    • > /wp-content/plugins/kata-plus/includes/importer/core/libraries/one-click-demo-import.php
    • > /wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/bin/create_pear_package.php
    • > /wp-content/plugins/kata-plus/includes/meta-box/meta-box-plugin/inc/templates/video.php
    • > /wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/examples/post.php
  • 222× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field\\Radio' not found in wp-content/plugins/kata-plus/includes/vendors/kirki/packages/kirki-framework/control-palette/src/Field/Palette.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/kata-plus/includes/meta-box/meta-box-plugin/inc/fields/input.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/kata-plus/includes/vendors/kirki/packages/kirki-framework/module-sections/src/Section_Types/Expanded.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/tests/Session.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/tests/IDNAEncoder.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_Field' not found in wp-content/plugins/kata-plus/includes/meta-box/meta-box-plugin/inc/fields/checkbox.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Requests_Auth' not found in wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/library/Requests/Auth/Basic.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/417.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_Field' not found in wp-content/plugins/kata-plus/includes/meta-box/meta-box-plugin/inc/fields/key-value.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/kata-plus/includes/importer/core/includes/vendor/rmccue/requests/library/Requests/Exception/HTTP/414.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: footer builder, elements, header builder, elementor widget, blog builder...

kata-plus/kata-plus.php 92% from 13 tests

Analyzing the main PHP file in "Kata Plus" version 1.2.9
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 320 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin197,872 lines of code in 3,573 files:
LanguageFilesBlank linesComment linesLines of code
PHP56210,54529,04075,426
CSS1917,99289644,763
JavaScript2855,1836,58032,488
JSON440030,753
SVG2,4642,0511211,178
XML112803972,408
Markdown123640813
YAML17027
Bourne Shell24012
Python1104

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 185)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity13.99
▷ Minimum class complexity1.00
▷ Maximum class complexity376.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity185.00
Code structure
Namespaces23
Interfaces5
Traits1
Classes460
▷ Abstract classes91.96%
▷ Concrete classes45198.04%
▷ Final classes132.88%
Methods2,805
▷ Static methods71625.53%
▷ Public methods2,26580.75%
▷ Protected methods30610.91%
▷ Private methods2348.34%
Functions128
▷ Named functions5139.84%
▷ Anonymous functions7760.16%
Constants66
▷ Global constants2740.91%
▷ Class constants3959.09%
▷ Public constants39100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
98 PNG files occupy 0.72MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/src/images/admin/plugins/kata-plugin-icon-28.png10.75KB2.55KB▼ 76.27%
assets/src/images/admin/dashboard/white-check.png0.37KB0.36KB▼ 2.92%
assets/src/images/admin/plugins/kata-plugin-icon.png4.86KB5.03KB0.00%
includes/vendors/kirki/assets/images/3cm.png0.91KB0.25KB▼ 72.00%
assets/src/images/admin/plugins/kata-plugin-icon-23.png2.21KB1.57KB▼ 29.06%