84% simple-blog-stats

Code Review | Simple Blog Stats

WordPress plugin Simple Blog Stats scored84%from 54 tests.

About plugin

  • Plugin page: simple-blog-stats
  • Plugin version: 20231025...
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Nov 17, 2012
  • Latest release: Oct 26, 2023
  • Number of updates: 58
  • Update frequency: every 69.0 days
  • Top authors: specialk (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

5,000+ active /110,119 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼2.39ms] Passed 4 tests

Server-side resources used by Simple Blog Stats
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2939.14 ▼0.14
Dashboard /wp-admin3.59 ▲0.2848.23 ▲3.86
Posts /wp-admin/edit.php3.69 ▲0.3344.86 ▼2.26
Add New Post /wp-admin/post-new.php6.16 ▲0.2792.58 ▼11.00
Media Library /wp-admin/upload.php3.50 ▲0.2738.57 ▲7.58
Simple Blog Stats /wp-admin/options-general.php?page=simple-blog-stats3.5448.46

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
sbs_options
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Blog Stats
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲18114.18 ▼0.172.20 ▲0.6342.47 ▲3.78
Dashboard /wp-admin2,323 ▲1425.66 ▼0.0683.95 ▼17.1539.32 ▼2.67
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0137.07 ▼0.4736.91 ▲1.15
Add New Post /wp-admin/post-new.php1,538 ▲118.16 ▼0.03638.21 ▲22.8971.32 ▲8.23
Media Library /wp-admin/upload.php1,404 ▲104.15 ▼0.0795.95 ▼2.2343.02 ▲0.61
Simple Blog Stats /wp-admin/options-general.php?page=simple-blog-stats2,1151.8627.7745.51

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-blog-stats/stats-functions.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

simple-blog-stats/simple-blog-stats.php 92% from 13 tests

"Simple Blog Stats" version 20231025...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "20231025...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,510 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47061131,510

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions53
▷ Named functions53100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
sbs-icon.png15.84KB9.06KB▼ 42.82%