88% kliken-all-in-one-marketing

Code Review | Kliken - Google Advertising and Stats

WordPress plugin Kliken - Google Advertising and Stats scored 88% from 54 tests.

About plugin

  • Plugin page: kliken-all-in-one...
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 5.9.2
  • First release: Apr 7, 2016
  • Latest release: Jan 25, 2022
  • Number of updates: 49
  • Update frequency: every 43.3 days
  • Top authors: sitewit (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

300+ active / 5,587 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼312.58ms] Passed 4 tests

This is a short check of server-side resources used by Kliken - Google Advertising and Stats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0256.07 ▲5.11
Dashboard /wp-admin3.44 ▲0.0334.58 ▼54.68
Posts /wp-admin/edit.php3.66 ▲0.0239.22 ▼0.58
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.25 ▼1,196.49
Media Library /wp-admin/upload.php3.31 ▲0.0226.24 ▲1.45

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 1 new option
New WordPress options
kk_schema_version

Browser metrics Passed 4 tests

A check of browser resources used by Kliken - Google Advertising and Stats
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲11415.98 ▲0.206.17 ▼0.922.55 ▲0.17
Dashboard /wp-admin2,965 ▲1076.11 ▼0.05121.71 ▼11.26155.11 ▼6.68
Posts /wp-admin/edit.php2,759 ▲683.27 ▲0.0363.57 ▲0.46142.18 ▼16.32
Add New Post /wp-admin/post-new.php1,640 ▼2119.59 ▲3.44414.46 ▲8.53156.35 ▲2.91
Media Library /wp-admin/upload.php1,771 ▲765.56 ▲0.06146.49 ▲6.96194.29 ▲8.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/kliken-all-in-one-marketing/class/class-messages.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/views/config.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/class/class-plugin.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/kliken.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/class/class-updater.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/class/class-helper.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/class/class-logger.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/class/class-api.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/init.php
    • > /wp-content/plugins/kliken-all-in-one-marketing/views/settings.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/kliken-all-in-one-marketing/vendor/nategood/httpful/src/Httpful/Handlers/XHtmlHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/kliken-all-in-one-marketing/vendor/nategood/httpful/src/Httpful/Handlers/CsvHandler.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/kliken-all-in-one-marketing/vendor/nategood/httpful/src/Httpful/Handlers/XmlHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/kliken-all-in-one-marketing/vendor/nategood/httpful/src/Httpful/Handlers/JsonHandler.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Httpful\\Handlers\\MimeHandlerAdapter' not found in wp-content/plugins/kliken-all-in-one-marketing/vendor/nategood/httpful/src/Httpful/Handlers/FormHandler.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 37 tag instead of maximum 10
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

kliken-all-in-one-marketing/kliken.php 92% from 13 tests

"Kliken - Google Advertising and Stats" version 1.6.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kliken-all-in-one-marketing.php" instead of "kliken.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,523 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP355021,3052,162
Markdown2910181
CSS118285
JSON20081
YAML13014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.60
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes14.00%
Methods187
▷ Static methods5529.41%
▷ Public methods17493.05%
▷ Protected methods10.53%
▷ Private methods126.42%
Functions10
▷ Named functions660.00%
▷ Anonymous functions440.00%
Constants46
▷ Global constants1839.13%
▷ Class constants2860.87%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/banner.png13.03KB14.18KB0.00%