74% wp-postviews-plus

Code Review | WP-PostViews Plus

WordPress plugin WP-PostViews Plus scored 74% from 54 tests.

About plugin

  • Plugin page: wp-postviews-plus
  • Plugin version: 2.1.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2007
  • Latest release: May 8, 2020
  • Number of updates: 165
  • Update frequency: every 29.6 days
  • Top authors: fantasyworld (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active / 104,784 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: ▲0.23MB] [CPU: ▼0.53ms] Passed 4 tests

Analyzing server-side resources used by WP-PostViews Plus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.11 ▼0.17
Dashboard /wp-admin3.55 ▲0.2550.36 ▲0.56
Posts /wp-admin/edit.php3.66 ▲0.3145.87 ▲1.05
Add New Post /wp-admin/post-new.php6.13 ▲0.2495.04 ▲3.01
Media Library /wp-admin/upload.php3.47 ▲0.2435.28 ▼3.56
PostViews+ /wp-admin/options-general.php?page=wp_postviews_plus3.4433.51

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: 1 new table, 9 new options
New tables
wp_postviews_plus
New WordPress options
widget_views-plus
PVP_version
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
PVP_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP-PostViews Plus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▲0.291.87 ▼0.0144.00 ▼6.22
Dashboard /wp-admin2,210 ▲225.90 ▲0.0698.08 ▼22.4936.60 ▼8.58
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0137.69 ▲0.5232.61 ▼2.22
Add New Post /wp-admin/post-new.php1,517 ▼217.80 ▼5.61597.76 ▼68.8247.27 ▼6.51
Media Library /wp-admin/upload.php1,395 ▲74.29 ▲0.1097.31 ▼20.1040.71 ▼10.73
PostViews+ /wp-admin/options-general.php?page=wp_postviews_plus1,1732.0323.5834.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_postviews_plus
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_views-plus
    • PVP_options
    • widget_recent-comments
    • widget_recent-posts
    • PVP_version
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 9× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-postviews-plus/widget/postviews_plus.php
    • > /wp-content/plugins/wp-postviews-plus/class.wp-pvp.template.php
    • > /wp-content/plugins/wp-postviews-plus/class.wp-pvp.admin.php
    • > /wp-content/plugins/wp-postviews-plus/class.wp-pvp.php
    • > /wp-content/plugins/wp-postviews-plus/class.wp-pvp.ajax.php
    • > /wp-content/plugins/wp-postviews-plus/class.wp-pvp.widget.php
    • > /wp-content/plugins/wp-postviews-plus/function.wp-pvp.template.php
    • > /wp-content/plugins/wp-postviews-plus/class.wp-pvp.update.php
    • > /wp-content/plugins/wp-postviews-plus/wp-postviews-plus.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: hits, postviews, bot, views, counter...

wp-postviews-plus/wp-postviews-plus.php Passed 13 tests

The main file in "WP-PostViews Plus" v. 2.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
76 characters long description:
Enables You To Display How Many Times A Post Had Been Viewed By User Or Bot.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,189 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9124421,189

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.71
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods3188.57%
▷ Public methods3188.57%
▷ Protected methods38.57%
▷ Private methods12.86%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin