10% unique-post-view-conter

Code Review | Unique Post Views Counter

WordPress plugin Unique Post Views Counter scored10%from 54 tests.

About plugin

  • Plugin page: unique-post-view-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Sep 13, 2013
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: chandra sekhar Gudavalli (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /3,211 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-includes/plugin.php+1001
    Undefined offset: 0

Server metrics [RAM: ▼1.93MB] [CPU: ▼59.06ms] Passed 4 tests

Analyzing server-side resources used by Unique Post Views Counter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.99 ▼31.94
Dashboard /wp-admin2.09 ▼1.267.70 ▼57.74
Posts /wp-admin/edit.php2.09 ▼1.277.16 ▼43.90
Add New Post /wp-admin/post-new.php2.09 ▼3.807.34 ▼102.66
Media Library /wp-admin/upload.php2.09 ▼1.146.16 ▼26.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: 1 new table, 6 new options
New tables
wp_uniquep2views
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Unique Post Views Counter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.081.97 ▲0.3743.20 ▲3.71
Dashboard /wp-admin2,195 ▲145.51 ▼0.2186.33 ▼9.7237.48 ▼13.31
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0334.13 ▼6.1434.48 ▲0.01
Add New Post /wp-admin/post-new.php1,526 ▼1022.95 ▲4.56640.50 ▲22.9051.78 ▼18.81
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0196.71 ▼1.3141.14 ▼2.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-includes/plugin.php+1001
    Undefined offset: 0
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_uniquep2views
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • 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
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/unique-post-view-conter/uniquep2views.php:120

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: unquer page count, unique views, total views, unique hits, unique counter...

unique-post-view-conter/uniquep2views.php 92% from 13 tests

The principal PHP file in "Unique Post Views Counter" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("unique-post-view-conter.php" instead of "uniquep2views.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected93 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171293

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions10
▷ Named functions10100.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
No PNG files were detected