78% post-volume-stats

Code Review | Post Volume Stats

WordPress plugin Post Volume Stats scored78%from 54 tests.

About plugin

  • Plugin page: post-volume-stats
  • Plugin version: 3.3.08
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 6.3.1
  • First release: Jul 12, 2016
  • Latest release: Jan 31, 2022
  • Number of updates: 153
  • Update frequency: every 13.3 days
  • Top authors: shortdark (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /5,438 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.73MB] [CPU: ▼2.74ms] Passed 4 tests

Server-side resources used by Post Volume Stats
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7645.69 ▲4.36
Dashboard /wp-admin4.08 ▲0.7355.63 ▼7.88
Posts /wp-admin/edit.php4.13 ▲0.7756.16 ▲5.20
Add New Post /wp-admin/post-new.php6.62 ▲0.73100.31 ▼12.65
Media Library /wp-admin/upload.php3.94 ▲0.7144.94 ▲9.31
Post Volume Stats /wp-admin/admin.php?page=post-volume-stats3.9074.61
Categories /wp-admin/admin.php?page=post-volume-stats-categories3.8838.38
Settings /wp-admin/admin.php?page=post-volume-stats-settings3.9136.87
Tags /wp-admin/admin.php?page=post-volume-stats-tags3.8837.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_sdpvs_widget
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Volume Stats
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12213.42 ▼1.171.66 ▼0.2038.62 ▼1.14
Dashboard /wp-admin2,275 ▲754.96 ▲0.09109.81 ▼0.1575.79 ▲29.31
Posts /wp-admin/edit.php2,171 ▲742.37 ▲0.3740.05 ▲3.2737.93 ▲4.50
Add New Post /wp-admin/post-new.php1,595 ▲5022.94 ▼0.13770.77 ▲121.3337.70 ▼14.01
Media Library /wp-admin/upload.php1,463 ▲634.38 ▲0.17101.82 ▲0.2180.13 ▲34.97
Post Volume Stats /wp-admin/admin.php?page=post-volume-stats1,1942.0133.8435.22
Categories /wp-admin/admin.php?page=post-volume-stats-categories9682.0829.5030.41
Settings /wp-admin/admin.php?page=post-volume-stats-settings1,0941.9031.3029.54
Tags /wp-admin/admin.php?page=post-volume-stats-tags9481.9831.4630.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_sdpvs_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=post-volume-stats-tags
    • > Notice in wp-content/plugins/post-volume-stats/sdpvs_subs.php+13
    Trying to access array offset on value of type bool

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
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/post-volume-stats/sdpvs_widget.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_arrays.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_lists.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_settings.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_subs.php
    • > /wp-content/plugins/post-volume-stats/post-volume-stats.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_main.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_pie.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_bar.php
    • > /wp-content/plugins/post-volume-stats/sdpvs_info.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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 need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Screenshots: Add an image for screenshot #9 (New "Date Range" page which applies a date range to the main page only, not "Category", "Tag" or "Custom Taxonomy" pages.)
The official readme.txt is a good inspiration

post-volume-stats/post-volume-stats.php 92% from 13 tests

"Post Volume Stats" version 3.3.08's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,517 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP106314053,258
JavaScript13710131
CSS1163128

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity64.75
▷ Minimum class complexity2.00
▷ Maximum class complexity179.00
Average method complexity9.72
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods3152.54%
▷ Protected methods2135.59%
▷ Private methods711.86%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/post-volume-stats-16x16.png1.60KB0.75KB▼ 53.18%