83% kannada-chankya-neeti

Code Review | Kannada Chanakya Neeti

WordPress plugin Kannada Chanakya Neeti scored 83% from 54 tests.

About plugin

  • Plugin page: kannada-chankya-n...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Dec 24, 2018
  • Latest release: Nov 12, 2019
  • Number of updates: 10
  • Update frequency: every 32.4 days
  • Top authors: sharag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 712 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.02MB] [CPU: ▼0.31ms] Passed 4 tests

A check of server-side resources used by Kannada Chanakya Neeti
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.65 ▼7.67
Dashboard /wp-admin3.33 ▲0.0245.46 ▼4.13
Posts /wp-admin/edit.php3.38 ▲0.0252.68 ▲6.21
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.53 ▲12.16
Media Library /wp-admin/upload.php3.25 ▲0.0237.18 ▲4.33

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

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

Browser metrics Passed 4 tests

Kannada Chanakya Neeti: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6714.48 ▼0.111.58 ▼0.3239.68 ▼5.34
Dashboard /wp-admin2,203 ▲185.88 ▲0.07122.88 ▲1.6342.58 ▼1.57
Posts /wp-admin/edit.php2,089 ▲31.97 ▼0.0242.62 ▲7.8841.18 ▲5.95
Add New Post /wp-admin/post-new.php1,535 ▲223.44 ▲0.28611.82 ▼97.1258.08 ▲3.60
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0396.28 ▼13.7244.72 ▼4.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_kannada-chanakya-neeti
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kannada-chankya-neeti/kcn.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #3 (Another Chanakya Neeti), #4 (Kannada Chanakya Neeti in Appearance > Widgets), #5 (Kannada Chanakya Neeti when added to sidebar. You can change it's title.)
The official readme.txt might help

kannada-chankya-neeti/kcn.php 85% from 13 tests

The main PHP script in "Kannada Chanakya Neeti" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 186 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("kannada-chankya-neeti.php" instead of "kcn.php")

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
Good job! No executable or dangerous file extensions detected67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1412863
CSS1004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.47KB5.70KB▼ 65.42%
screenshot-2.png23.88KB7.79KB▼ 67.36%