83% post-visit-count

Code Review | Post visit count

WordPress plugin Post visit count scored83%from 54 tests.

About plugin

  • Plugin page: post-visit-count
  • Plugin version: 4.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Mar 14, 2021
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: kinjaldalwadi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.22ms] Passed 4 tests

A check of server-side resources used by Post visit count
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.33 ▼2.00
Dashboard /wp-admin3.31 ▲0.0048.33 ▼2.19
Posts /wp-admin/edit.php3.36 ▲0.0045.91 ▼2.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.97 ▼14.12
Media Library /wp-admin/upload.php3.23 ▲0.0037.25 ▲2.66

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Post visit count
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.36 ▼1.001.65 ▼0.0238.54 ▼2.67
Dashboard /wp-admin2,206 ▲184.83 ▼0.09110.63 ▲7.9843.33 ▲0.25
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0134.82 ▼2.9332.83 ▲0.47
Add New Post /wp-admin/post-new.php1,514 ▼617.59 ▼5.42686.05 ▲27.4766.72 ▲15.20
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.09106.37 ▲8.7146.06 ▲0.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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 no errors were found, this is by no means 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-visit-count/postvisitcount.php:27

User-side errors Passed 1 test

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

Optimizations

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 your attention: You can take inspiration from this readme.txt

post-visit-count/postvisitcount.php 85% from 13 tests

The principal PHP file in "Post visit count" v. 4.1.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("post-visit-count.php" instead of "postvisitcount.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin30 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP271430

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions4
▷ Named functions4100.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