84% theme-stats-view

Code Review | Theme Stats View

WordPress plugin Theme Stats View scored84%from 54 tests.

About plugin

  • Plugin page: theme-stats-view
  • Plugin version: 1.09
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 29
  • Update frequency: every 44.6 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,191 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.12MB] [CPU: ▼12.15ms] Passed 4 tests

Analyzing server-side resources used by Theme Stats View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1635.92 ▼6.59
Dashboard /wp-admin3.45 ▲0.1550.19 ▼3.88
Posts /wp-admin/edit.php3.57 ▲0.2151.23 ▲5.32
Add New Post /wp-admin/post-new.php4.97 ▼0.9249.04 ▼39.77
Media Library /wp-admin/upload.php3.38 ▲0.1436.56 ▲1.63
Theme Stats View /wp-admin/options-general.php?page=ThemeStatsView3.3432.18

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

A short overview of filesystem and database impact
This plugin 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_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Theme Stats View
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.19 ▼0.471.57 ▼0.4039.18 ▼3.87
Dashboard /wp-admin2,196 ▲165.63 ▼0.0395.65 ▲12.1241.35 ▼5.25
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0535.96 ▼1.1633.54 ▲0.58
Add New Post /wp-admin/post-new.php6,210 ▲4,67921.15 ▼1.77881.77 ▲197.6975.33 ▲17.06
Media Library /wp-admin/upload.php1,407 ▲134.17 ▼0.0597.65 ▼1.1441.32 ▼1.71
Theme Stats View /wp-admin/options-general.php?page=ThemeStatsView9192.0025.3929.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 no errors were found, this is by no means 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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-stats-view/lib/class-themestatsviewadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-stats-view/lib/class-themestatsviewadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/theme-stats-view/lib/class-themestatsview.php:37

User-side errors Passed 1 test

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

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: stats, theme, theme stats

theme-stats-view/themestatsview.php 92% from 13 tests

The main PHP file in "Theme Stats View" ver. 1.09 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("theme-stats-view.php" instead of "themestatsview.php")

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 detected811 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP594192665
JavaScript4100119
JSON10021
CSS1036

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity43.50
▷ Minimum class complexity19.00
▷ Maximum class complexity68.00
Average method complexity5.72
▷ Minimum method complexity1.00
▷ Maximum method complexity31.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
No PNG files were detected