83% wp-simple-post-view

Code Review | Post View Count

WordPress plugin Post View Count scored83%from 54 tests.

About plugin

  • Plugin page: wp-simple-post-view
  • Plugin version: 1.8.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2020
  • Latest release: Oct 13, 2023
  • Number of updates: 33
  • Update frequency: every 36.8 days
  • Top authors: nareshparmar827 (66.67%)dipakparmar443 (36.36%)

Code review

54 tests

User reviews

11 reviews

Install metrics

6,000+ active /42,848 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.21ms] Passed 4 tests

A check of server-side resources used by Post View Count
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.15 ▲0.53
Dashboard /wp-admin3.37 ▲0.0646.04 ▼4.66
Posts /wp-admin/edit.php3.48 ▲0.1244.99 ▼0.36
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.36 ▼3.34
Media Library /wp-admin/upload.php3.29 ▲0.0634.96 ▼0.47

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Post View Count
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.25 ▼0.111.64 ▲0.1037.54 ▼4.84
Dashboard /wp-admin2,214 ▲345.61 ▼0.0585.24 ▼3.9039.60 ▼0.69
Posts /wp-admin/edit.php2,146 ▲461.99 ▼0.0033.20 ▼3.8433.13 ▼2.64
Add New Post /wp-admin/post-new.php6,242 ▲4,71618.99 ▼4.10890.20 ▲143.8061.38 ▼0.45
Media Library /wp-admin/upload.php1,413 ▲164.33 ▲0.1197.55 ▼4.4642.41 ▼5.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-simple-post-view/includes/customFunctions.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-simple-post-view/includes/add_post_column.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-simple-post-view/includes/postSimplePostView.php:135

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in wp-simple-post-view/assets to your readme.txt
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-simple-post-view/wp-simple-post-view.php Passed 13 tests

"Post View Count" version 1.8.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
116 characters long description:
Using this plugin, see how many views your posts have. [ngd-single-post-view] OR [ngd-single-post-view id="post_id"]

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
Good job! No executable or dangerous file extensions detected324 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP58761324

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.67
▷ Minimum class complexity8.00
▷ Maximum class complexity21.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods750.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.22MB with 0.18MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot/screenshot-2.png117.48KB28.86KB▼ 75.44%
(invalid) assets/icon-128x128.png32.78KB0.00KB▼ 100.00%
screenshot/screenshot-1.png72.46KB19.59KB▼ 72.96%