78% very-simple-wp-statistics

Code Review | Very Simple WP Statistics Bars

WordPress plugin Very Simple WP Statistics Bars scored78%from 54 tests.

About plugin

  • Plugin page: very-simple-wp-st...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 6.3.1
  • First release: Aug 17, 2019
  • Latest release: Jan 2, 2021
  • Number of updates: 9
  • Update frequency: every 56.1 days
  • Top authors: jschaves (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /530 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.06MB] [CPU: ▼2.24ms] Passed 4 tests

Server-side resources used by Very Simple WP Statistics Bars
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.85 ▼3.68
Dashboard /wp-admin3.36 ▲0.0550.60 ▼2.64
Posts /wp-admin/edit.php3.47 ▲0.1148.02 ▼2.51
Add New Post /wp-admin/post-new.php5.96 ▲0.07101.25 ▼0.13
Media Library /wp-admin/upload.php3.28 ▲0.0537.26 ▲4.68
VSWP Statistics /wp-admin/options-general.php?page=very-simple-wp-statistics-settings3.2631.56

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Very Simple WP Statistics Bars
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.21 ▼1.192.01 ▲0.2942.82 ▼2.28
Dashboard /wp-admin2,214 ▲326.06 ▲0.24105.25 ▲0.3642.60 ▼4.67
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0134.94 ▼7.1134.09 ▼2.30
Add New Post /wp-admin/post-new.php1,521 ▲223.37 ▲0.16658.06 ▼19.3655.54 ▼11.14
Media Library /wp-admin/upload.php1,396 ▲84.31 ▲0.14107.78 ▼1.1846.77 ▲1.03
VSWP Statistics /wp-admin/options-general.php?page=very-simple-wp-statistics-settings9772.2329.5730.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=very-simple-wp-statistics-settings
    • > Notice in wp-content/plugins/very-simple-wp-statistics/shared/vswps-class-deserializer.php+36
    Undefined variable: ouput

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=very-simple-wp-statistics-settings
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: bars, statistics

very-simple-wp-statistics/very-simple-wp-statistics-settings.php 92% from 13 tests

"Very Simple WP Statistics Bars" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("very-simple-wp-statistics.php" instead of "very-simple-wp-statistics-settings.php")

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
There were no executable files found in this plugin598 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP928238317
JavaScript2812205
CSS14040
PO File1101036

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/right.png11.00KB1.11KB▼ 89.90%
admin/img/close.png30.04KB10.56KB▼ 64.85%
public/img/left.png10.92KB1.11KB▼ 89.83%
public/img/close.png30.04KB10.56KB▼ 64.85%