10% send-to-statsd

Code Review | Send to Statsd

WordPress plugin Send to Statsd scored10%from 54 tests.

About plugin

  • Plugin page: send-to-statsd
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Jan 28, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: vohof (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /637 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Compile error in wp-content/plugins/send-to-statsd/send-to-statsd.php+143
    Cannot use variable $section twice

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.04ms] Passed 4 tests

Server-side resources used by Send to Statsd
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.04 ▼6.52
Dashboard /wp-admin3.31 ▲0.0044.42 ▼5.13
Posts /wp-admin/edit.php3.36 ▲0.0050.91 ▲5.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.43 ▼15.22
Media Library /wp-admin/upload.php3.23 ▲0.0036.15 ▼1.28

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Send to Statsd
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.68 ▼0.721.73 ▼0.0637.33 ▼10.87
Dashboard /wp-admin2,203 ▲155.90 ▼0.00112.55 ▲7.4842.98 ▲3.14
Posts /wp-admin/edit.php2,092 ▼02.05 ▼0.0043.10 ▲5.1535.11 ▲3.25
Add New Post /wp-admin/post-new.php1,542 ▼018.24 ▼4.69599.59 ▼66.5551.07 ▼2.60
Media Library /wp-admin/upload.php1,385 ▲34.17 ▼0.08101.36 ▲0.4841.05 ▼0.08

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 83× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Domnikl\\Statsd\\Connection' not found in wp-content/plugins/send-to-statsd/vendor/domnikl/statsd/lib/Connection/InMemory.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/send-to-statsd/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/send-to-statsd/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\Test\\TestCase' not found in wp-content/plugins/send-to-statsd/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/send-to-statsd/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/send-to-statsd/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php:4
    • > PHP Warning
      require(wp-content/plugins/send-to-statsd/vendor/domnikl/statsd/tests/integration/../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/send-to-statsd/vendor/domnikl/statsd/tests/integration/tcp-test.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/send-to-statsd/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/send-to-statsd/vendor/domnikl/statsd/tests/integration/../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/send-to-statsd/vendor/domnikl/statsd/tests/integration/udp-test.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Domnikl\\Statsd\\Connection' not found in wp-content/plugins/send-to-statsd/vendor/domnikl/statsd/tests/unit/ConnectionMock.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === send-to-statsd === )
You can look at the official readme.txt

send-to-statsd/send-to-statsd.php Passed 13 tests

The main file in "Send to Statsd" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
34 characters long description:
Send statistics to a statsd daemon

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,617 lines of code in 104 files:
LanguageFilesBlank linesComment linesLines of code
PHP915559493,015
Markdown3750263
JSON400253
XML22044
make19020
YAML23018
JavaScript1004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.60
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes79
▷ Abstract classes33.80%
▷ Concrete classes7696.20%
▷ Final classes00.00%
Methods192
▷ Static methods31.56%
▷ Public methods15078.12%
▷ Protected methods3719.27%
▷ Private methods52.60%
Functions24
▷ Named functions729.17%
▷ Anonymous functions1770.83%
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
There were not PNG files found in your plugin