84% clicky-analytics

Code Review | Clicky Analytics

WordPress plugin Clicky Analytics scored84%from 54 tests.

About plugin

  • Plugin page: clicky-analytics
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.4
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Dec 2, 2023
  • Number of updates: 126
  • Update frequency: every 30.5 days
  • Top authors: deconf (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

10,000+ active /283,457 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
Install script ran successfully

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

Analyzing server-side resources used by Clicky Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.17 ▼1.45
Dashboard /wp-admin3.34 ▼0.0048.42 ▼17.50
Posts /wp-admin/edit.php3.45 ▲0.0952.14 ▲5.63
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.26 ▲10.34
Media Library /wp-admin/upload.php3.26 ▲0.0338.54 ▲8.37
Setup /wp-admin/admin.php?page=cawp_setup3.2635.05
Debug /wp-admin/admin.php?page=cawp_errors_debugging3.2337.44
Settings /wp-admin/admin.php?page=cawp_settings3.2333.38

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 56 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
cawp_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Clicky Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14615.41 ▲1.095.57 ▲3.9240.32 ▼3.47
Dashboard /wp-admin2,323 ▲1497.31 ▲1.73127.06 ▲29.5641.01 ▲0.98
Posts /wp-admin/edit.php2,138 ▲382.00 ▲0.0339.62 ▲2.6736.88 ▲6.09
Add New Post /wp-admin/post-new.php1,568 ▲4123.47 ▲0.18617.05 ▲29.8849.85 ▲4.25
Media Library /wp-admin/upload.php1,432 ▲324.19 ▲0.0197.44 ▼9.0043.57 ▲0.67
Setup /wp-admin/admin.php?page=cawp_setup1,4708.23254.8769.16
Debug /wp-admin/admin.php?page=cawp_errors_debugging1,3597.73203.1570.69
Settings /wp-admin/admin.php?page=cawp_settings1,6567.73163.0743.83

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/clicky-analytics/admin/views/settings-sidebar.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: You can look at the official readme.txt

clicky-analytics/clicky_analytics.php 92% from 13 tests

The main PHP file in "Clicky Analytics" ver. 2.0.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("clicky-analytics.php" instead of "clicky_analytics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin5,845 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP183076402,340
JavaScript135372662,213
CSS12221401,292

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity22.12
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity5.39
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes1275.00%
Methods77
▷ Static methods2735.06%
▷ Public methods6280.52%
▷ Protected methods00.00%
▷ Private methods1519.48%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/clicky.png2.51KB1.79KB▼ 28.76%
admin/images/star.png1.47KB1.39KB▼ 5.31%
admin/images/seiwp-icon.png0.34KB0.27KB▼ 19.08%
admin/images/wp.png3.21KB1.72KB▼ 46.50%
admin/images/help.png1.99KB1.69KB▼ 15.20%