10% personal-hit-counter

Code Review | Personal Hit Counter

WordPress plugin Personal Hit Counter scored10%from 54 tests.

About plugin

  • Plugin page: personal-hit-counter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: May 8, 2023
  • Number of updates: 85
  • Update frequency: every 26.9 days
  • Top authors: tawhidurrahmandear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /3,863 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/personal-hit-counter/personal-hit-counter.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; tawhidurrahmandeartwentysevenWidget has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼54.59ms] Passed 4 tests

Analyzing server-side resources used by Personal Hit Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.66 ▼33.28
Dashboard /wp-admin2.08 ▼1.266.52 ▼51.61
Posts /wp-admin/edit.php2.08 ▼1.275.73 ▼44.61
Add New Post /wp-admin/post-new.php2.08 ▼3.805.93 ▼88.87
Media Library /wp-admin/upload.php2.08 ▼1.156.55 ▼29.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_tawhidurrahmandeartwentysevenwidget
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Personal Hit Counter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.38 ▼1.271.76 ▼0.1245.18 ▲1.67
Dashboard /wp-admin2,203 ▲185.79 ▼0.0798.86 ▼9.4738.70 ▼1.20
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0538.60 ▲1.1834.62 ▲2.67
Add New Post /wp-admin/post-new.php1,546 ▲3218.36 ▲0.80685.01 ▲7.3763.99 ▲2.41
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.03108.62 ▼1.5446.87 ▼0.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/personal-hit-counter/personal-hit-counter.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; tawhidurrahmandeartwentysevenWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_tawhidurrahmandeartwentysevenwidget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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: record, visitor counter, counter, visit counter, hit counter

personal-hit-counter/personal-hit-counter.php 92% from 13 tests

This is the main PHP file of "Personal Hit Counter" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 244 characters long)

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 detected101 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11813101

PHP code Passed 2 tests

An short overview of 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.16
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin