90% sitestats

Code Review | SiteStats

WordPress plugin SiteStats scored90%from 54 tests.

About plugin

  • Plugin page: sitestats
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jan 8, 2015
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: mrpaolo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,640 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.01MB] [CPU: ▼0.78ms] Passed 4 tests

Analyzing server-side resources used by SiteStats
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.30 ▲2.86
Dashboard /wp-admin3.31 ▲0.0149.65 ▼1.88
Posts /wp-admin/edit.php3.36 ▲0.0149.98 ▲2.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.07 ▼6.04
Media Library /wp-admin/upload.php3.24 ▲0.0139.91 ▲1.99

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SiteStats
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.31 ▼1.071.85 ▲0.0945.24 ▲2.77
Dashboard /wp-admin2,218 ▲305.82 ▲0.93101.04 ▼6.5239.22 ▼3.35
Posts /wp-admin/edit.php2,110 ▲212.03 ▲0.0238.59 ▲4.0335.85 ▲2.09
Add New Post /wp-admin/post-new.php1,543 ▲1023.22 ▼0.05655.21 ▲56.9959.63 ▼11.20
Media Library /wp-admin/upload.php1,409 ▲184.28 ▲0.08104.02 ▲1.4547.05 ▼1.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

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)
No browser errors were detected

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
10 plugin tags: stat, comments, words, authors, statistics...

sitestats/sitestats.php Passed 13 tests

The principal PHP file in "SiteStats" v. 1.0.1 is loaded by WordPress automatically on each request
72 characters long description:
Provides useful and interesting statistics about your Wordpress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,008 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP78735861
CSS13318125
Markdown113022

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin