84% plugin-stats-view

Code Review | Plugin Stats View

WordPress plugin Plugin Stats View scored84%from 54 tests.

About plugin

  • Plugin page: plugin-stats-view
  • Plugin version: 2.22
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2016
  • Latest release: Oct 31, 2023
  • Number of updates: 107
  • Update frequency: every 26.7 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,530 total downloads

Benchmarks

Plugin footprint 83% 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.13MB] [CPU: ▼15.66ms] Passed 4 tests

Server-side resources used by Plugin Stats View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.34 ▲0.58
Dashboard /wp-admin3.45 ▲0.1046.73 ▼16.37
Posts /wp-admin/edit.php3.57 ▲0.2148.98 ▲0.29
Add New Post /wp-admin/post-new.php4.97 ▼0.9249.89 ▼47.14
Media Library /wp-admin/upload.php3.38 ▲0.1435.86 ▲4.87
Plugin Stats View /wp-admin/options-general.php?page=PluginStatsView3.3435.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Plugin Stats View: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4314.35 ▲0.071.61 ▼0.1844.87 ▼1.97
Dashboard /wp-admin2,199 ▲195.58 ▼0.1089.33 ▼7.8338.94 ▼3.64
Posts /wp-admin/edit.php2,101 ▲12.01 ▼0.0839.22 ▼2.0435.39 ▼1.50
Add New Post /wp-admin/post-new.php6,210 ▲4,68421.37 ▼1.70877.07 ▲202.4179.69 ▲17.97
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.0398.45 ▼4.2641.58 ▼1.28
Plugin Stats View /wp-admin/options-general.php?page=PluginStatsView9591.9925.1933.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/plugin-stats-view/lib/class-pluginstatsview.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plugin-stats-view/lib/class-pluginstatsviewadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plugin-stats-view/lib/class-pluginstatsviewadmin.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: plugin, plugin stats, stats

plugin-stats-view/pluginstatsview.php 92% from 13 tests

The main PHP script in "Plugin Stats View" version 2.22 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("plugin-stats-view.php" instead of "pluginstatsview.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin799 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP592192653
JavaScript4100119
JSON10021
CSS1036

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity40.50
▷ Minimum class complexity19.00
▷ Maximum class complexity62.00
Average method complexity5.39
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin