78% redistats

Code Review | Redistats - Multisite stats

WordPress plugin Redistats - Multisite stats scored78%from 54 tests.

About plugin

  • Plugin page: redistats
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.6
  • WordPress version: 6.3.1
  • First release: Aug 2, 2013
  • Latest release: Aug 22, 2013
  • Number of updates: 15
  • Update frequency: every 1.3 days
  • Top authors: JimWestergren (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,852 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.46ms] Passed 4 tests

Server-side resources used by Redistats - Multisite stats
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.68 ▼5.75
Dashboard /wp-admin3.31 ▲0.0144.41 ▼2.17
Posts /wp-admin/edit.php3.36 ▲0.0051.37 ▲2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.74 ▼8.25
Media Library /wp-admin/upload.php3.23 ▲0.0034.21 ▼1.65
Redistats /wp-admin/options-general.php?page=redistats/settings.php3.2637.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Redistats - Multisite stats
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.48 ▼0.881.59 ▼0.4740.83 ▼3.37
Dashboard /wp-admin2,213 ▲224.94 ▲0.04111.77 ▼4.6041.90 ▼0.67
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0140.00 ▲5.2335.35 ▼0.32
Add New Post /wp-admin/post-new.php1,536 ▲2223.12 ▲5.37621.15 ▼68.8049.80 ▼6.05
Media Library /wp-admin/upload.php1,392 ▲74.21 ▼0.1094.30 ▼11.2540.39 ▼1.42
Redistats /wp-admin/options-general.php?page=redistats/settings.php8812.0325.0329.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=redistats/settings.php
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=redistats/settings.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=redistats/settings.php
    • > Deprecated in wp-content/plugins/redistats/settings.php+23
    define(): Declaration of case-insensitive constants is deprecated

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/redistats/view.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/redistats/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/redistats/redistats.php:21

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: plugin, statistics, multisite, stats, redistats

redistats/redistats.php 92% from 13 tests

This is the main PHP file of "Redistats - Multisite stats" version 0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin186 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33246186

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.19KB0.16KB▼ 14.66%