10% stats-for-wp

Code Review | Stats for WP

WordPress plugin Stats for WP scored10%from 54 tests.

About plugin

  • Plugin page: stats-for-wp
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 18, 2018
  • Latest release: Jul 18, 2018
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: statsforwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5643
    File upgrade-functions.php is deprecated since version 2.5.0! Use wp-admin/includes/upgrade.php instead.

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.60ms] Passed 4 tests

An overview of server-side resources used by Stats for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.70 ▼0.22
Dashboard /wp-admin3.33 ▲0.0346.11 ▼0.27
Posts /wp-admin/edit.php3.38 ▲0.0250.47 ▼2.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.76 ▲0.74
Media Library /wp-admin/upload.php3.26 ▲0.0235.10 ▲3.07

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: 1 new table, 8 new options
New tables
wp_statsforwp
New WordPress options
widget_theysaidso_widget
stats_for_wp_current_version
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
stats_for_wpinstalled
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Stats for WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.74 ▲0.331.79 ▲0.2141.71 ▼1.01
Dashboard /wp-admin2,222 ▲315.84 ▲0.7597.84 ▼6.7737.57 ▼3.84
Posts /wp-admin/edit.php2,105 ▲162.04 ▼0.0240.24 ▲1.8635.20 ▲2.71
Add New Post /wp-admin/post-new.php1,546 ▲1123.23 ▲0.02597.09 ▼22.4455.22 ▲1.05
Media Library /wp-admin/upload.php1,404 ▲164.20 ▼0.0193.63 ▼6.5641.63 ▼1.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_statsforwp
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • stats_for_wpinstalled
    • widget_recent-posts
    • widget_recent-comments
    • stats_for_wp_current_version
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
The SRP test was a success

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: stats, user stats, logs

stats-for-wp/stats-for-wp.php 92% from 13 tests

Analyzing the main PHP file in "Stats for WP" version 1.0.3
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 166 characters long)

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
Success! There were no dangerous files found in this plugin235 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14416235

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected