93% display-post-views-count

Code Review | Display Post Views Count

WordPress plugin Display Post Views Count scored 93% from 54 tests.

About plugin

  • Plugin page: display-post-view...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Sep 3, 2021
  • Latest release: Sep 3, 2021
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: wpevince (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 78 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼139.94ms] Passed 4 tests

This is a short check of server-side resources used by Display Post Views Count
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.3038.39 ▲17.15
Dashboard /wp-admin3.25 ▲0.1944.66 ▼2.74
Posts /wp-admin/edit.php3.36 ▲0.2546.41 ▲2.66
Add New Post /wp-admin/post-new.php5.61 ▲0.1790.67 ▼559.99
Media Library /wp-admin/upload.php3.19 ▲0.1932.89 ▲0.31
Post Views Count /wp-admin/options-general.php?page=display-post-views-count/viewscount-options.php3.2330.66

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Display Post Views Count
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲10215.78 ▲0.268.81 ▲0.0152.65 ▲3.82
Dashboard /wp-admin2,978 ▲475.94 ▼0.04140.43 ▼10.40116.62 ▲1.74
Posts /wp-admin/edit.php2,767 ▲282.72 ▼0.0066.13 ▲0.7497.38 ▲5.55
Add New Post /wp-admin/post-new.php1,875 ▲26019.19 ▼2.34374.08 ▲103.13106.63 ▲6.29
Media Library /wp-admin/upload.php1,815 ▲85.09 ▲0.07159.07 ▲11.96115.93 ▼6.46
Post Views Count /wp-admin/options-general.php?page=display-post-views-count/viewscount-options.php1,4962.0957.1496.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/display-post-views-count/viewscount-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-post-views-count/display-post-views-count.php:14

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)
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

display-post-views-count/display-post-views-count.php 85% from 13 tests

"Display Post Views Count" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 163 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,068 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions38100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected