83% simple-stats-total

Code Review | Simple Stats Total

WordPress plugin Simple Stats Total scored83%from 54 tests.

About plugin

  • Plugin page: simple-stats-total
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Aug 8, 2019
  • Latest release: Aug 8, 2019
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: enescala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /517 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.84ms] Passed 4 tests

Analyzing server-side resources used by Simple Stats Total
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.1757.27 ▲8.05
Dashboard /wp-admin3.72 ▲0.1552.58 ▼4.46
Posts /wp-admin/edit.php3.77 ▲0.0949.80 ▼1.93
Add New Post /wp-admin/post-new.php6.24 ▲0.0986.94 ▼20.93
Media Library /wp-admin/upload.php3.58 ▲0.0944.07 ▲3.96
Simple Stats Total /wp-admin/tools.php?page=simple-stats-total4.8857.97

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 74 new files
Database: 1 new table, 7 new options
New tables
wp_simple_stats_total
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
sst_plugin_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Simple Stats Total
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.30 ▼0.492.10 ▲0.3044.54 ▼0.07
Dashboard /wp-admin2,202 ▲285.67 ▲0.0598.95 ▼10.6743.51 ▼2.40
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0335.79 ▼1.8835.01 ▼5.40
Add New Post /wp-admin/post-new.php1,370 ▼16117.03 ▼6.05580.77 ▼98.3246.90 ▼19.67
Media Library /wp-admin/upload.php1,407 ▲74.24 ▲0.04113.29 ▼12.5947.65 ▼0.61
Simple Stats Total /wp-admin/tools.php?page=simple-stats-total1,0051.9227.4154.41

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 28× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Test\\AbstractTestCase' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/tests/Util/ConverterTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\AbstractParser' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/src/DeviceParser.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Test\\AbstractTestCase' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/tests/Util/Logfile/AbstractReaderTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Result\\AbstractClient' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/src/Result/Client.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Exception\\DomainException' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/src/Exception/ReaderException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Exception\\DomainException' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/src/Exception/FetcherException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/src/Command/LogfileCommand.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Test\\AbstractTestCase' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/tests/Result/OperatingSystemTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/tests/AbstractTestCase.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Util\\Logfile\\AbstractReader' not found in wp-content/plugins/simple-stats-total/vendor/ua-parser/uap-php/src/Util/Logfile/ApacheCommonLogFormatReader.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image not found
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

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

The main PHP script in "Simple Stats Total" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected9,352 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP484587098,698
Markdown31010319
JSON400222
CSS20748
YAML16025
XML12023
Bourne Shell12016
JavaScript1061

PHP code Passed 2 tests

This is a short overview 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.29
Average class complexity5.59
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces12
Interfaces1
Traits0
Classes40
▷ Abstract classes820.00%
▷ Concrete classes3280.00%
▷ Final classes00.00%
Methods155
▷ Static methods3321.29%
▷ Public methods11372.90%
▷ Protected methods2214.19%
▷ Private methods2012.90%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.29KB10.74KB▼ 71.96%