74% page-views-count

Code Review | Page View Count

WordPress plugin Page View Count scored74%from 54 tests.

About plugin

  • Plugin page: page-views-count
  • Plugin version: 2.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Nov 23, 2023
  • Number of updates: 154
  • Update frequency: every 25.9 days
  • Top authors: a3rev (100%)

Code review

54 tests

User reviews

51 reviews

Install metrics

20,000+ active /614,419 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲1.82MB] [CPU: ▲4.85ms] Passed 4 tests

Analyzing server-side resources used by Page View Count
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.32 ▲1.8553.14 ▲11.75
Dashboard /wp-admin5.13 ▲1.7854.47 ▼6.64
Posts /wp-admin/edit.php5.18 ▲1.8259.86 ▲8.87
Add New Post /wp-admin/post-new.php7.72 ▲1.83100.31 ▲5.41
Media Library /wp-admin/upload.php5.09 ▲1.8560.15 ▲23.48
Page Views Count /wp-admin/options-general.php?page=a3-pvc5.1059.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 167 new files
Database: 2 new tables, 15 new options
New tables
wp_pvc_total
wp_pvc_daily
New WordPress options
pvc_style_version
db_upgraded
pvc_settings
widget_theysaidso_widget
a3rev_auth_pvc
widget_recent-posts
a3rev_pvc_plugin
a3_pvc_version
a3_page_view_count_clean_on_deletion
pvc_reset_all_individual
...

Browser metrics Passed 4 tests

An overview of browser requirements for Page View Count
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲14613.50 ▼0.6710.43 ▲8.9843.19 ▲1.59
Dashboard /wp-admin2,201 ▲235.62 ▼0.0896.47 ▼14.7144.50 ▼0.91
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0539.32 ▼1.4136.48 ▲1.11
Add New Post /wp-admin/post-new.php6,449 ▲4,92327.34 ▲4.30948.34 ▲246.7757.87 ▼9.83
Media Library /wp-admin/upload.php1,406 ▲34.18 ▼0.01110.77 ▲5.2948.17 ▲3.40
Page Views Count /wp-admin/options-general.php?page=a3-pvc2,7494.50102.6869.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_pvc_total
    • wp_pvc_daily
  • Zombie WordPress options were found after uninstall: 15 options
    • theysaidso_admin_options
    • widget_widget_pvc_stats
    • pvc_current_rest_api_enabled
    • a3_pvc_version
    • a3rev_auth_pvc
    • pvc_settings
    • pvc_reset_all_individual
    • widget_recent-posts
    • widget_theysaidso_widget
    • pvc_style_version
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/page-views-count/admin/plugin-init.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/page-views-count/includes/customized_style.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/page-views-count/page-views-count.php:16

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: post view count, page view count, gutenberg, wordpress page view, post views

page-views-count/page-views-count.php 92% from 13 tests

The primary PHP file in "Page View Count" version 2.8.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 252 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected41,003 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
JSON20013,239
JavaScript312,0111,54912,454
PHP312,2381,8399,602
CSS242961753,251
PO File56417831,543
LESS78729796
SVG73051
Sass33138
HTML12029

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 410)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity76.81
▷ Minimum class complexity1.00
▷ Maximum class complexity801.00
Average method complexity5.98
▷ Minimum method complexity1.00
▷ Maximum method complexity410.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods398
▷ Static methods358.79%
▷ Public methods22957.54%
▷ Protected methods14135.43%
▷ Private methods287.04%
Functions24
▷ Named functions1979.17%
▷ Anonymous functions520.83%
Constants16
▷ Global constants1168.75%
▷ Class constants531.25%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
28 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/slider-bg-disable.png1.04KB0.14KB▼ 86.45%
assets/images/free-wordpress-plugins.png79.93KB29.22KB▼ 63.44%
assets/images/follow-facebook.png1.56KB0.43KB▼ 72.77%
admin/assets/images/slider-container-start-disable.png1.53KB0.56KB▼ 63.40%
admin/assets/images/slider-bg-track1.png1.10KB0.61KB▼ 44.28%