84% shinystat-analytics

Code Review | ShinyStat Analytics

WordPress plugin ShinyStat Analytics scored84%from 54 tests.

About plugin

  • Plugin page: shinystat-analytics
  • Plugin version: 1.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2020
  • Latest release: May 31, 2023
  • Number of updates: 53
  • Update frequency: every 17.7 days
  • Top authors: shinystat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /6,368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.49MB] [CPU: ▼14.99ms] Passed 4 tests

An overview of server-side resources used by ShinyStat Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2043.38 ▼4.08
Dashboard /wp-admin3.49 ▲0.1947.63 ▼3.79
Posts /wp-admin/edit.php3.61 ▲0.2547.79 ▼3.71
Add New Post /wp-admin/post-new.php3.37 ▼2.5242.20 ▼48.37
Media Library /wp-admin/upload.php3.42 ▲0.1938.07 ▲1.50
ShinyStat /wp-admin/options-general.php?page=shinystat-analytics3.3937.59

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

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

Browser metrics Passed 4 tests

ShinyStat Analytics: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.34 ▼0.241.65 ▼0.1739.17 ▼6.77
Dashboard /wp-admin2,201 ▲245.57 ▼0.0985.23 ▼4.5141.38 ▲5.32
Posts /wp-admin/edit.php2,106 ▲32.01 ▲0.0534.95 ▼4.7833.76 ▼0.88
Add New Post /wp-admin/post-new.php1,533 ▼323.02 ▲4.66681.92 ▲46.9855.46 ▼5.72
Media Library /wp-admin/upload.php1,406 ▲34.20 ▼0.09106.17 ▲4.4047.38 ▲2.87
ShinyStat /wp-admin/options-general.php?page=shinystat-analytics9101.9927.7844.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_shinystat_analytics_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/shinystat-analytics/admin/partials/shinystat-analytics-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/shinystat-analytics/includes/class-shinystat-analytics-widget.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

shinystat-analytics/shinystat-analytics.php Passed 13 tests

"ShinyStat Analytics" version 1.0.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
100 characters long description:
Activate the plugin and start to use ShinyStat Web Analytics and On-site Marketing Automation tools.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,164 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11384744917
CSS1223162
PO File1323885

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.38
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods49
▷ Static methods24.08%
▷ Public methods4285.71%
▷ Protected methods00.00%
▷ Private methods714.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/conversions_en.png70.37KB26.33KB▼ 62.58%
admin/images/conversions_it.png69.39KB26.09KB▼ 62.39%