10% statistical

Code Review | Statistical

WordPress plugin Statistical scored 10% from 54 tests.

About plugin

  • Plugin page: statistical
  • Plugin version: 1.0a...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2015
  • Latest release: Oct 8, 2015
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: sojournings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,725 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Statistics' does not have a method 'plugin_activation'

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.20ms] Passed 4 tests

An overview of server-side resources used by Statistical
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.79 ▲0.23
Dashboard /wp-admin3.35 ▲0.0449.28 ▼0.39
Posts /wp-admin/edit.php3.40 ▲0.0452.44 ▲4.10
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.82 ▼12.16
Media Library /wp-admin/upload.php3.28 ▲0.0639.14 ▲3.52

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
total_no_of_words_in_blog
total_no_posts_since_start
can_compress_scripts
widget_statistics_widget
avg_words_published_per_day
no_of_days_since_first_post
...

Browser metrics Passed 4 tests

Statistical: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.191.67 ▼0.2342.46 ▼0.42
Dashboard /wp-admin2,209 ▲214.86 ▼0.0797.19 ▼11.2140.40 ▼3.55
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0139.12 ▼1.0336.33 ▲0.35
Add New Post /wp-admin/post-new.php1,514 ▼1917.83 ▼5.35665.95 ▲52.0460.49 ▲11.92
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.0494.64 ▼7.5943.92 ▼0.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Statistics' does not have a method 'plugin_deactivation'
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • total_no_posts_since_start
    • widget_recent-comments
    • widget_statistics_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • total_no_of_words_in_blog
    • widget_theysaidso_widget
    • avg_words_published_per_day
    • no_of_days_since_first_post
    • ...

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/statistical/statistics.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/statistical/class.statistics-widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

statistical/statistics.php 69% from 13 tests

This is the main PHP file of "Statistical" version 1.0a..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1.0a...")
  • Main file name: Name the main plugin file the same as the plugin slug ("statistical.php" instead of "statistics.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 343 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin132 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35539132

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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.11
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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