77% kama-clic-counter

Code Review | Kama Click Counter

WordPress plugin Kama Click Counter scored77%from 54 tests.

About plugin

  • Plugin page: kama-clic-counter
  • Plugin version: 3.6.10
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Feb 9, 2022
  • Number of updates: 124
  • Update frequency: every 21.9 days
  • Top authors: Tkama (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /30,249 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.54ms] Passed 4 tests

This is a short check of server-side resources used by Kama Click Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.62 ▼2.95
Dashboard /wp-admin3.35 ▲0.0049.02 ▼17.44
Posts /wp-admin/edit.php3.46 ▲0.1047.80 ▼3.39
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.91 ▼10.39
Media Library /wp-admin/upload.php3.27 ▲0.0438.09 ▲1.74
Kama Click Counter /wp-admin/options-general.php?page=kama-clic-counter3.4729.57

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 68 new files
Database: 1 new table, 9 new options
New tables
wp_kcc_clicks
New WordPress options
widget_recent-comments
widget_kcc_widget
widget_theysaidso_widget
db_upgraded
kcc_version
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
kcc_options

Browser metrics Passed 4 tests

Kama Click Counter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.65 ▼0.941.86 ▼0.2339.81 ▼6.63
Dashboard /wp-admin2,234 ▲314.85 ▼0.05108.07 ▲4.7838.32 ▼5.92
Posts /wp-admin/edit.php2,113 ▲101.98 ▼0.0839.05 ▼1.1236.51 ▼0.86
Add New Post /wp-admin/post-new.php1,532 ▲617.78 ▲0.08693.62 ▲12.1954.39 ▲2.75
Media Library /wp-admin/upload.php1,410 ▲104.23 ▲0.00103.42 ▲1.7846.42 ▼0.56
Kama Click Counter /wp-admin/options-general.php?page=kama-clic-counter8922.0226.6233.95

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=kama-clic-counter
    • > Notice in wp-content/plugins/kama-clic-counter/admin/options-page.php+23
    Undefined property: KCCounter_Admin::$msg
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=kama-clic-counter
    • > Notice in wp-content/plugins/kama-clic-counter/admin/options-page.php+418
    Undefined index: subpage
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=kama-clic-counter
    • > Notice in wp-content/plugins/kama-clic-counter/admin/options-page.php+416
    Undefined index: edit_link
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=kama-clic-counter
    • > Notice in wp-content/plugins/kama-clic-counter/admin/options-page.php+319
    Undefined index: order_by

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kama-clic-counter/_backward-compatibility.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kama-clic-counter/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_user_option() in wp-content/plugins/kama-clic-counter/admin/mce/mce.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'KCCounter' not found in wp-content/plugins/kama-clic-counter/class-KCCounter_Admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === kama-clic-counter === )
Please take inspiration from this readme.txt

kama-clic-counter/kama_click_counter.php 77% from 13 tests

The main file in "Kama Click Counter" v. 3.6.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kama-clic-counter.php" instead of "kama_click_counter.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,567 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP115185474,481
JavaScript1331386

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity64.00
▷ Minimum class complexity4.00
▷ Maximum class complexity213.00
Average method complexity5.97
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes233.33%
Methods75
▷ Static methods912.00%
▷ Public methods5877.33%
▷ Protected methods1722.67%
▷ Private methods00.00%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants13
▷ Global constants430.77%
▷ Class constants969.23%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
55 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/gz.png1.27KB1.35KB0.00%
icons/sys.png1.53KB1.66KB0.00%
icons/asf.png1.42KB1.53KB0.00%
icons/mov.png1.69KB1.90KB0.00%
icons/mp3.png1.45KB1.64KB0.00%