72% a-click-tracker

Code Review | a click tracker

WordPress plugin a click tracker scored 72% from 54 tests.

About plugin

  • Plugin page: a-click-tracker
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6.1
  • WordPress version: 5.9.2
  • First release: Oct 3, 2013
  • Latest release: Oct 3, 2013
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: kazunii (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 938 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼2.50MB] [CPU: ▼348.91ms] Passed 4 tests

A check of server-side resources used by a click tracker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼1.659.30 ▼43.24
Dashboard /wp-admin1.88 ▼1.525.49 ▼32.46
Posts /wp-admin/edit.php1.89 ▼1.753.95 ▼67.73
Add New Post /wp-admin/post-new.php1.88 ▼5.083.71 ▼1,252.19
Media Library /wp-admin/upload.php1.88 ▼1.413.93 ▼26.40
a click tracker /wp-admin/options-general.php?page=a-click-tracker/a-click-tracker.php1.894.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

a click tracker: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,895 ▲14116.22 ▲0.489.43 ▲3.632.65 ▲0.22
Dashboard /wp-admin2,880 ▲226.12 ▼0.04132.48 ▼2.97168.44 ▲2.79
Posts /wp-admin/edit.php2,693 ▼13.23 ▼0.0165.27 ▲2.64142.73 ▼4.40
Add New Post /wp-admin/post-new.php1,755 ▲9921.56 ▲1.61447.45 ▼18.19176.33 ▲18.75
Media Library /wp-admin/upload.php1,700 ▲55.54 ▲0.07147.11 ▼3.22234.80 ▲42.23
a click tracker /wp-admin/options-general.php?page=a-click-tracker/a-click-tracker.php1,0942.3954.11210.58

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
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=a-click-tracker/a-click-tracker.php
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/a-click-tracker/a-click-tracker.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=a-click-tracker/a-click-tracker.php
    • > Network (severe)
    https://si0.twimg.com/profile_images/2074468470/_______mini.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: There were no tags found
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

a-click-tracker/a-click-tracker.php Passed 13 tests

The principal PHP file in "a click tracker" v. 0.1 is loaded by WordPress automatically on each request
86 characters long description:
全てのaタグのクリックをGoogle Analyticsのイベントに記録します。

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
No dangerous file extensions were detected96 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP182486
JavaScript10010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected