80% post-views-counter

Code Review | Post Views Counter

WordPress plugin Post Views Counter scored80%from 54 tests.

About plugin

  • Plugin page: post-views-counter
  • Plugin version: 1.4.3
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2014
  • Latest release: Nov 20, 2023
  • Number of updates: 113
  • Update frequency: every 30.4 days
  • Top authors: dfactory (100%)

Code review

54 tests

User reviews

967 reviews

Install metrics

200,000+ active /2,738,020 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by Post Views Counter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1342.27 ▼0.42
Dashboard /wp-admin3.56 ▲0.2156.20 ▼3.65
Posts /wp-admin/edit.php3.66 ▲0.3053.45 ▼0.56
Add New Post /wp-admin/post-new.php6.09 ▲0.2088.79 ▼3.09
Media Library /wp-admin/upload.php3.46 ▲0.2337.51 ▲6.07
Display /wp-admin/admin.php?page=post-views-counter&tab=display3.4336.45
Reports /wp-admin/admin.php?page=post-views-counter&tab=reports3.4333.75
General /wp-admin/admin.php?page=post-views-counter3.4332.18
Other /wp-admin/admin.php?page=post-views-counter&tab=other3.4332.07

Server storage [IO: ▲0.72MB] [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: 40 new files
Database: 1 new table, 8 new options
New tables
wp_post_views
New WordPress options
widget_post_views_counter_list_widget
post_views_counter_activation_date
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Views Counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲23915.95 ▲1.691.76 ▲0.0428.01 ▼16.38
Dashboard /wp-admin2,404 ▲2236.55 ▲0.79168.07 ▲68.6248.66 ▲9.29
Posts /wp-admin/edit.php2,204 ▲1042.05 ▲0.0954.52 ▲12.6040.49 ▲3.49
Add New Post /wp-admin/post-new.php1,586 ▲5723.53 ▲0.40655.13 ▲69.3635.24 ▼13.11
Media Library /wp-admin/upload.php1,446 ▲464.18 ▼0.1296.43 ▼0.0641.10 ▼2.52
Display /wp-admin/admin.php?page=post-views-counter&tab=display1,1542.0425.8434.93
Reports /wp-admin/admin.php?page=post-views-counter&tab=reports9532.0324.6431.98
General /wp-admin/admin.php?page=post-views-counter1,2771.7130.7635.62
Other /wp-admin/admin.php?page=post-views-counter&tab=other1,0012.2125.5729.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_post_views
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_post_views_counter_list_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • post_views_counter_activation_date

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt might help

post-views-counter/post-views-counter.php Passed 13 tests

This is the main PHP file of "Post Views Counter" version 1.4.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
140 characters long description:
Post Views Counter allows you to display how many times a post, page or custom post type had been viewed in a simple, fast and reliable way.

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
Everything looks great! No dangerous files found in this plugin6,955 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,3022,3365,932
JavaScript11135205507
CSS83615487
Markdown19029

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.63
Average class complexity62.53
▷ Minimum class complexity1.00
▷ Maximum class complexity180.00
Average method complexity5.73
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods195
▷ Static methods10.51%
▷ Public methods18092.31%
▷ Protected methods10.51%
▷ Private methods147.18%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/page-reports.png172.82KB70.52KB▼ 59.19%