68% humanized-statistics

Code Review | Humanized statistics

WordPress plugin Humanized statistics scored68%from 54 tests.

About plugin

  • Plugin page: humanized-statistics
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 25, 2012
  • Latest release: Jun 14, 2021
  • Number of updates: 21
  • Update frequency: every 151.6 days
  • Top authors: KwarK (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,103 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.88MB] [CPU: ▼53.01ms] Passed 4 tests

An overview of server-side resources used by Humanized statistics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.09 ▼3.18
Dashboard /wp-admin2.06 ▼1.245.92 ▼44.90
Posts /wp-admin/edit.php2.07 ▼1.296.58 ▼39.97
Add New Post /wp-admin/post-new.php2.06 ▼3.826.92 ▼100.41
Media Library /wp-admin/upload.php2.06 ▼1.166.32 ▼26.76

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 65 new files
Database: no new tables, 19 new options
New WordPress options
widget_recent-comments
weibo_referer
db_upgraded
gcs_3d_chart
twitter_referer
gcs_social
qzone_referer
widget_theysaidso_widget
vk_referer
facebook_referer
...

Browser metrics Passed 4 tests

Humanized statistics: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.31 ▼0.251.89 ▲0.3544.13 ▲3.44
Dashboard /wp-admin2,233 ▲565.88 ▲0.2190.66 ▲0.3848.39 ▲8.13
Posts /wp-admin/edit.php2,137 ▲372.35 ▲0.3339.95 ▲5.2036.57 ▲1.03
Add New Post /wp-admin/post-new.php6,357 ▲4,83127.58 ▲4.16984.72 ▲296.3738.84 ▼16.15
Media Library /wp-admin/upload.php1,432 ▲324.55 ▲0.36100.18 ▼6.8645.37 ▼2.13
Stats by categories /wp-admin/google-chart-statistics.php?page=pages-admin/admin-cats.php260.420.0616.63
General configuration /wp-admin/google-chart-statistics.php260.420.097.09
Stats home page /wp-admin/google-chart-statistics.php?page=pages-admin/admin-home.php260.420.136.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the gcs-admincss handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/humanized-statistics/pages-admin/admin-cats.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/humanized-statistics/google-chart-statistics.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/humanized-statistics/pages-admin/admin-gcs.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/humanized-statistics/pages-admin/admin-home.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/google-chart-statistics.php?page=pages-admin/admin-cats.php
    • > Network (severe)
    wp-admin/google-chart-statistics.php?page=pages-admin/admin-cats.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/google-chart-statistics.php
    • > Network (severe)
    wp-admin/google-chart-statistics.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/google-chart-statistics.php?page=pages-admin/admin-home.php
    • > Network (severe)
    wp-admin/google-chart-statistics.php?page=pages-admin/admin-home.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (No screenshot actually) image not found
The official readme.txt might help

humanized-statistics/google-chart-statistics.php 92% from 13 tests

Analyzing the main PHP file in "Humanized statistics" version 0.7
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("humanized-statistics.php" instead of "google-chart-statistics.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
There were no executable files found in this plugin2,923 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP42742661,779
CSS4994511,144

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions18
▷ Named functions18100.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
45 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/dark-hive/images/ui-bg_highlight-soft_44_444444_1x100.png0.11KB0.18KB0.00%
css/black-tie/images/ui-bg_diagonals-thick_8_333333_40x40.png0.25KB0.15KB▼ 37.70%
css/black-tie/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/start/images/ui-bg_flat_55_999999_40x100.png0.18KB0.08KB▼ 51.67%
css/black-tie/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%