89% simple-post-views

Code Review | Simple Post Views

WordPress plugin Simple Post Views scored 89% from 54 tests.

About plugin

  • Plugin page: simple-post-views
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 25, 2023
  • Latest release: Sep 25, 2023
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: bdprojukti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 23 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.09ms] Passed 4 tests

A check of server-side resources used by Simple Post Views
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.32 ▼7.51
Dashboard /wp-admin3.33 ▲0.0343.92 ▼4.81
Posts /wp-admin/edit.php3.39 ▲0.0348.63 ▲4.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.19 ▼3.28
Media Library /wp-admin/upload.php3.26 ▲0.0336.40 ▲3.23
Post Views /wp-admin/options-general.php?page=spvc-settings3.2232.22

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

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

Browser metrics Passed 4 tests

Simple Post Views: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.28 ▼1.301.52 ▼0.1338.89 ▼3.05
Dashboard /wp-admin2,213 ▲254.86 ▼1.04105.15 ▲7.1140.42 ▼6.42
Posts /wp-admin/edit.php2,105 ▲162.00 ▼0.0136.14 ▲0.3733.81 ▼0.16
Add New Post /wp-admin/post-new.php1,548 ▲1518.31 ▼4.87591.12 ▼139.9559.35 ▼2.38
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0296.14 ▼6.9841.94 ▼2.57
Post Views /wp-admin/options-general.php?page=spvc-settings8022.0623.7730.83

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3 in simple-post-views/assets to your readme.txt
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

simple-post-views/simple-post-views.php Passed 13 tests

The main file in "Simple Post Views" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
70 characters long description:
A simple plugin to count unique post views and display the view count.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected136 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11820136

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin