79% counter-hits

Code Review | Counter-Hits

WordPress plugin Counter-Hits scored 79% from 54 tests.

About plugin

  • Plugin page: counter-hits
  • Plugin version: 1.8
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9
  • WordPress version: 6.3.1
  • First release: Nov 5, 2018
  • Latest release: Feb 16, 2022
  • Number of updates: 13
  • Update frequency: every 92.2 days
  • Top authors: wpgear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 2,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.05ms] Passed 4 tests

Analyzing server-side resources used by Counter-Hits
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.52 ▼1.17
Dashboard /wp-admin3.31 ▲0.0154.04 ▲4.48
Posts /wp-admin/edit.php3.36 ▲0.0149.92 ▲1.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.74 ▼7.07
Media Library /wp-admin/upload.php3.24 ▲0.0134.90 ▼1.19

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
wpgear_counter_hits_sign
wpgear_counter_hits
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Counter-Hits
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.73 ▼0.651.56 ▼0.2539.67 ▼5.11
Dashboard /wp-admin2,206 ▲155.88 ▲1.01110.61 ▼6.3042.55 ▼4.01
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0340.34 ▼8.8535.83 ▼13.67
Add New Post /wp-admin/post-new.php1,548 ▲3418.35 ▲0.82615.35 ▲9.0170.30 ▲3.96
Media Library /wp-admin/upload.php1,391 ▼04.24 ▼0.0499.42 ▼6.8946.69 ▲2.58

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • wpgear_counter_hits_sign
    • 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 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/counter-hits/uninstall.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/counter-hits/counter-hits.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: hits, visitors, counter, activity

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

The main file in "Counter-Hits" v. 1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
76 characters long description:
A simple, easy, fast, adaptive, local, objective counter to visit your site.

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
No dangerous file extensions were detected42 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3151742

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin