84% wpit-blog-stats

Code Review | Wpit Blog Stats

WordPress plugin Wpit Blog Stats scored84%from 54 tests.

About plugin

  • Plugin page: wpit-blog-stats
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.8
  • WordPress version: 6.3.1
  • First release: Mar 31, 2015
  • Latest release: Jul 10, 2021
  • Number of updates: 27
  • Update frequency: every 84.9 days
  • Top authors: wolly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,693 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.07MB] [CPU: ▲1.51ms] Passed 4 tests

An overview of server-side resources used by Wpit Blog Stats
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.70 ▲1.88
Dashboard /wp-admin3.37 ▲0.0747.84 ▼0.82
Posts /wp-admin/edit.php3.49 ▲0.1350.06 ▲0.76
Add New Post /wp-admin/post-new.php5.95 ▲0.07105.45 ▲4.22
Media Library /wp-admin/upload.php3.30 ▲0.0737.02 ▲4.38
Wpit Stats Settings /wp-admin/options-general.php?page=wpit-stats-settings3.2534.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
wpit_blogstats_version
widget_recent-comments
widget_recent-posts
wpit-stats-years-options

Browser metrics Passed 4 tests

Checking browser requirements for Wpit Blog Stats
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.17 ▼1.122.06 ▲0.1242.85 ▼5.30
Dashboard /wp-admin2,217 ▲295.83 ▲0.9399.25 ▼0.2641.98 ▼0.80
Posts /wp-admin/edit.php2,103 ▲142.01 ▲0.0135.81 ▼5.4036.10 ▲0.61
Add New Post /wp-admin/post-new.php1,550 ▲818.19 ▲0.17588.58 ▼5.6266.04 ▲5.63
Media Library /wp-admin/upload.php1,402 ▲144.21 ▼0.0296.66 ▼5.4742.44 ▼2.99
Wpit Stats Settings /wp-admin/options-general.php?page=wpit-stats-settings7972.0524.3928.40

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • wpit-stats-years-options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • wpit_blogstats_version
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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 following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpit-blog-stats/wpit-blog-stats.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpit-blog-stats/inc/class-wpit-messages.php:24

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: stats

wpit-blog-stats/wpit-blog-stats.php Passed 13 tests

The main PHP script in "Wpit Blog Stats" version 1.4 is automatically included on every request by WordPress
27 characters long description:
Basic stats about your blog

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
No dangerous file extensions were detected305 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2225187278
CSS2141227

PHP code Passed 2 tests

Analyzing 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.34
Average class complexity18.50
▷ Minimum class complexity4.00
▷ Maximum class complexity33.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1466.67%
▷ Protected methods00.00%
▷ Private methods733.33%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin