84% tgstatistics

Code Review | tgStatistics

WordPress plugin tgStatistics scored84%from 54 tests.

About plugin

  • Plugin page: tgstatistics
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2017
  • Latest release: Dec 24, 2017
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: vision98 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /556 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼14.07ms] Passed 4 tests

Server-side resources used by tgStatistics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0338.96 ▼12.15
Dashboard /wp-admin3.31 ▲0.0050.15 ▼13.00
Posts /wp-admin/edit.php3.36 ▼0.4953.93 ▼16.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.33 ▼14.78
Media Library /wp-admin/upload.php3.23 ▲0.0040.21 ▲3.86

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for tgStatistics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.16 ▼0.211.90 ▼0.0038.85 ▼8.92
Dashboard /wp-admin2,195 ▲185.64 ▼0.0291.43 ▼1.3641.79 ▼5.20
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0238.98 ▼1.8436.26 ▼1.58
Add New Post /wp-admin/post-new.php1,528 ▼023.00 ▼0.27694.06 ▼7.9668.89 ▲9.05
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.02103.09 ▼5.4949.80 ▲5.99

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tgstatistics/tgStatistics.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: channel, telegram, statistics

tgstatistics/tgStatistics.php 85% from 13 tests

"tgStatistics" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("tgstatistics.php" instead of "tgStatistics.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin30 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12830

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected