78% clicky

Code Review | Clicky by Yoast

WordPress plugin Clicky by Yoast scored78%from 54 tests.

About plugin

  • Plugin page: clicky
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Nov 3, 2009
  • Latest release: Apr 6, 2023
  • Number of updates: 90
  • Update frequency: every 54.5 days
  • Top authors: joostdevalk (73.33%)Yoast (20%)DeFries (6.67%)ireneyoast (2.22%)herregroen (2.22%)

Code review

54 tests

User reviews

11 reviews

Install metrics

20,000+ active /343,912 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.20ms] 75% from 4 tests

This is a short check of server-side resources used by Clicky by Yoast
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 749.17ms on /wp-admin/options-general.php?page=clicky)
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.87 ▲1.64
Dashboard /wp-admin3.36 ▲0.0547.41 ▼0.44
Posts /wp-admin/edit.php3.47 ▲0.1148.83 ▲0.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.16 ▼7.80
Media Library /wp-admin/upload.php3.28 ▲0.0532.52 ▼5.17
Clicky /wp-admin/options-general.php?page=clicky7.55749.17
Clicky Stats /wp-admin/index.php?page=clicky_stats3.2731.66

Server storage [IO: ▲0.30MB] [DB: ▲0.55MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 77 new files
Database: no new tables, 7 new options
New WordPress options
clicky
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Clicky by Yoast
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8213.19 ▼1.192.00 ▲0.2543.73 ▲1.19
Dashboard /wp-admin2,220 ▲325.83 ▲0.93100.87 ▼5.5437.85 ▼3.74
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0539.66 ▲2.9334.88 ▲1.21
Add New Post /wp-admin/post-new.php6,282 ▲4,76819.86 ▲2.42885.01 ▲189.1757.35 ▲3.08
Media Library /wp-admin/upload.php1,405 ▲204.25 ▼0.0593.62 ▼7.8940.78 ▼2.48
Clicky /wp-admin/options-general.php?page=clicky1,0242.2426.3033.20
Clicky Stats /wp-admin/index.php?page=clicky_stats7902.1925.4823.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • clicky
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clicky/admin/views/stats-page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clicky/admin/views/admin-page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/clicky/admin/views/meta-box.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Clicky_Options' not found in wp-content/plugins/clicky/admin/options-admin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_json_encode() in wp-content/plugins/clicky/frontend/views/script.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Clicky_Admin' not found in wp-content/plugins/clicky/admin/admin-page.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_json_encode() in wp-content/plugins/clicky/frontend/views/comment-author-script.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/clicky/admin/views/like-box.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/index.php?page=clicky_stats
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://clicky.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: statistics, clicky, affiliate, analytics, getclicky

clicky/clicky.php 85% from 13 tests

The main PHP script in "Clicky by Yoast" version 2.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 186 characters long)
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6.20" instead of "5.6")

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
No dangerous file extensions were detected1,486 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP222957701,462
Markdown111020
CSS3003
JavaScript1001

PHP code Passed 2 tests

A brief analysis 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.35
Average class complexity15.45
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods93
▷ Static methods44.30%
▷ Public methods5761.29%
▷ Protected methods00.00%
▷ Private methods3638.71%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/email_sub.png0.69KB0.81KB0.00%
images/rss.png0.70KB0.70KB0.00%
images/clicky-32x32.png1.76KB1.76KB0.00%
images/twitter-icon.png0.64KB1.02KB0.00%
images/facebook-icon.png0.68KB0.90KB0.00%