84% kwanko-tracking

Code Review | Kwanko tracking

WordPress plugin Kwanko tracking scored84%from 54 tests.

About plugin

  • Plugin page: kwanko-tracking
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.26-6.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2022
  • Latest release: Mar 20, 2023
  • Number of updates: 12
  • Update frequency: every 28.3 days
  • Top authors: kwanko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼4.64ms] Passed 4 tests

This is a short check of server-side resources used by Kwanko tracking
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2944.51 ▲0.06
Dashboard /wp-admin3.61 ▲0.3150.96 ▼6.82
Posts /wp-admin/edit.php3.66 ▲0.3151.02 ▼0.54
Add New Post /wp-admin/post-new.php6.13 ▲0.2591.80 ▼11.26
Media Library /wp-admin/upload.php3.47 ▲0.2538.21 ▲1.32
Kwanko - Tracking Tags for Advertisers /wp-admin/options-general.php?page=kwanko-tracking3.4540.41

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Kwanko tracking: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.71 ▲0.281.58 ▼0.3940.94 ▼6.38
Dashboard /wp-admin2,199 ▲195.60 ▼0.0391.68 ▼1.7640.34 ▼5.46
Posts /wp-admin/edit.php2,083 ▼172.03 ▼0.0035.29 ▼7.8834.00 ▼5.87
Add New Post /wp-admin/post-new.php1,531 ▲523.25 ▼0.09638.23 ▼30.4657.62 ▼1.00
Media Library /wp-admin/upload.php1,407 ▲74.20 ▲0.01101.75 ▼10.6344.07 ▼5.47
Kwanko - Tracking Tags for Advertisers /wp-admin/options-general.php?page=kwanko-tracking9862.0226.6532.75

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/kwanko-tracking/admin/partials/kwanko-tracking-admin-display.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: kwanko

kwanko-tracking/kwanko-tracking.php Passed 13 tests

"Kwanko tracking" version 1.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Simply install and configure your Kwanko tracking.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,246 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP144971,0091,099
PO File14548147

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity19.10
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods82
▷ Static methods67.32%
▷ Public methods7085.37%
▷ Protected methods78.54%
▷ Private methods56.10%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin