84% clicker-counter

Code Review | Clicker Counter

WordPress plugin Clicker Counter scored 84% from 54 tests.

About plugin

  • Plugin page: clicker-counter
  • Plugin version: 2.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Aug 17, 2016
  • Number of updates: 5
  • Update frequency: every 97.4 days
  • Top authors: butterflymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,506 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.76ms] Passed 4 tests

This is a short check of server-side resources used by Clicker Counter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.31 ▼6.13
Dashboard /wp-admin3.36 ▲0.0643.03 ▼3.94
Posts /wp-admin/edit.php3.41 ▲0.0545.17 ▼1.54
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.45 ▼11.41
Media Library /wp-admin/upload.php3.28 ▲0.0535.57 ▲1.21
Clicker Counter /wp-admin/options-general.php?page=cppie3.2529.34

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
cc_custom
cc_relationship
widget_recent-posts
cc_filetype
db_upgraded
cc_class

Browser metrics Passed 4 tests

Checking browser requirements for Clicker Counter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7513.15 ▼1.605.24 ▲3.0042.64 ▼2.35
Dashboard /wp-admin2,207 ▲225.80 ▲0.8499.67 ▼5.3939.50 ▼5.28
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0038.93 ▲5.1233.04 ▼2.83
Add New Post /wp-admin/post-new.php1,545 ▲1723.04 ▲4.69625.42 ▲9.4266.86 ▲16.25
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0198.02 ▼4.5442.45 ▼2.66
Clicker Counter /wp-admin/options-general.php?page=cppie8802.0221.8734.69

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 10 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • cc_custom
    • widget_recent-comments
    • cc_class
    • widget_theysaidso_widget
    • cc_relationship
    • db_upgraded
    • theysaidso_admin_options
    • cc_filetype

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/clicker-counter/clicker-counter.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/clicker-counter/clicker-counter.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
No tags were found

clicker-counter/clicker-counter.php Passed 13 tests

The main file in "Clicker Counter" v. 2.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
118 characters long description:
Clicker Counter allows you to track clicks on file extensions or classes. All clicks are logged and ordered by amount.

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 detected331 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14816330
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected