62% chakra-test

Code Review | Chakra test

WordPress plugin Chakra test scored62%from 54 tests.

About plugin

  • Plugin page: chakra-test
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2021
  • Latest release: Jun 16, 2022
  • Number of updates: 7
  • Update frequency: every 24.0 days
  • Top authors: vikasratudi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /820 total downloads


Plugin footprint 65% 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.18MB] [CPU: ▼19.46ms] Passed 4 tests

An overview of server-side resources used by Chakra test
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0323.07 ▼18.39
Dashboard /wp-admin3.12 ▼0.1927.72 ▼24.71
Posts /wp-admin/edit.php3.26 ▼0.1036.45 ▼17.91
Add New Post /wp-admin/post-new.php5.50 ▼0.4075.95 ▼16.83
Media Library /wp-admin/upload.php3.20 ▼0.0331.37 ▼3.78
Chakra Test /wp-admin/admin.php?page=chakratest3.1030.24
More /wp-admin/admin.php?page=chakratest-more3.1029.75

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: 3 new tables, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Chakra test
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.69 ▼0.775.04 ▲3.3740.34 ▼6.29
Dashboard /wp-admin2,240 ▲524.91 ▼0.96115.32 ▲9.7740.90 ▲0.55
Posts /wp-admin/edit.php2,126 ▲372.04 ▼0.0154.34 ▲12.8444.52 ▲11.17
Add New Post /wp-admin/post-new.php1,547 ▲3323.15 ▲5.58601.72 ▲6.0854.28 ▲4.95
Media Library /wp-admin/upload.php1,422 ▲314.22 ▲0.0096.23 ▼6.3142.87 ▼2.00
Chakra Test /wp-admin/admin.php?page=chakratest9421.8626.2825.89
More /wp-admin/admin.php?page=chakratest-more8652.1923.8927.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_chakratest_questions
    • wp_chakratest_group
    • wp_chakratest_options
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=chakratest-more
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/chakra-test/uninstall.php
    • > /wp-content/plugins/chakra-test/inc/chakracomingsoon.php
    • > /wp-content/plugins/chakra-test/inc/vfchakrateststructure.php
    • > /wp-content/plugins/chakra-test/chakratest.php
    • > /wp-content/plugins/chakra-test/inc/db.php
    • > /wp-content/plugins/chakra-test/inc/chakrastructure.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=chakratest-more
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'split')" "TypeError: Cannot read properties of undefined (reading 'split')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/chakra-test/assets/js/custom.js?ver=1.0.0:128:27)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=chakratest-more
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'split')


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
  • Screenshots: Add descriptions for screenshots #2, #3, #7 in chakra-test/assets to your readme.txt
You can take inspiration from this readme.txt

chakra-test/chakratest.php 85% from 13 tests

This is the main PHP file of "Chakra test" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("chakra-test.php" instead of "chakratest.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,261 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1083.33%
▷ Anonymous functions216.67%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
There were not PNG files found in your plugin