10% decalog

Code Review | DecaLog

WordPress plugin DecaLog scored10%from 54 tests.

About plugin

  • Plugin page: decalog
  • Plugin version: 3.9.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Aug 26, 2019
  • Latest release: Oct 25, 2023
  • Number of updates: 64
  • Update frequency: every 23.8 days
  • Top authors: PierreLannoy (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /21,552 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/decalog/includes/system/class-sharedmemory.php+97
    shmop_open(): unable to attach or create shared memory segment 'No such file or directory'

Server metrics [RAM: ▲5.09MB] [CPU: ▲65.02ms] 75% from 4 tests

An overview of server-side resources used by DecaLog
Please fix the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.09MB on /wp-admin/admin.php?page=perfopsone-dashboard)
PageMemory (MB)CPU Time (ms)
Home /8.14 ▲4.68104.35 ▲58.99
Dashboard /wp-admin8.55 ▲5.24116.94 ▲70.02
Posts /wp-admin/edit.php8.63 ▲5.26126.37 ▲81.25
Add New Post /wp-admin/post-new.php11.13 ▲5.24155.48 ▲55.72
Media Library /wp-admin/upload.php8.44 ▲5.20108.92 ▲75.34
Consoles /wp-admin/admin.php?page=perfopsone-consoles8.41101.78
DecaLog /wp-admin/admin.php?page=decalog-settings9.62126.64
Live Events /wp-admin/admin.php?page=decalog-console8.4199.58
Control Center /wp-admin/admin.php?page=perfopsone-dashboard8.5695.79

Server storage [IO: ▲8.79MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • There were 2 files (8.88KB) illegally modified outside of "wp-content/plugins/decalog/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/_decalog_loader.php
    • (new file) wp-content/fatal-error-handler.php
Filesystem: 1,713 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

DecaLog: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.43 ▼0.121.80 ▼0.0839.63 ▼1.45
Dashboard /wp-admin2,232 ▲525.48 ▼0.1882.29 ▼2.9735.82 ▼2.31
Posts /wp-admin/edit.php2,140 ▲402.02 ▲0.0637.03 ▼0.6531.29 ▼5.69
Add New Post /wp-admin/post-new.php1,546 ▲1120.87 ▲2.59647.81 ▲27.0252.50 ▼11.02
Media Library /wp-admin/upload.php1,440 ▲374.19 ▼0.1295.62 ▼4.2441.47 ▼1.46
Consoles /wp-admin/admin.php?page=perfopsone-consoles8992.0026.3927.78
DecaLog /wp-admin/admin.php?page=decalog-settings2,1001.7424.2254.55
Live Events /wp-admin/admin.php?page=decalog-console9182.1631.1242.51
Control Center /wp-admin/admin.php?page=perfopsone-dashboard1,0712.0124.4730.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=decalog-console
    • > Warning in wp-content/plugins/decalog/includes/system/class-sharedmemory.php+97
    shmop_open(): unable to attach or create shared memory segment 'No such file or directory'

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/decalog/public/partials/decalog-public-display.php
  • 940× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'InfluxDB2\\Model\\ModelInterface' not found in wp-content/plugins/decalog/includes/libraries/influxdb/Model/UserLinks.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Prometheus\\Storage\\Adapter' not found in wp-content/plugins/decalog/includes/libraries/prometheus/Storage/APC.php:12
    • > PHP Warning
      Use of undefined constant DAY_IN_SECONDS - assumed 'DAY_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/decalog/includes/system/class-cache.php on line 112
    • > PHP Fatal error
      Uncaught Error: Interface 'InfluxDB2\\Model\\ModelInterface' not found in wp-content/plugins/decalog/includes/libraries/influxdb/Model/Label.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'DLGuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/decalog/includes/libraries/guzzlehttp/Stream/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'InfluxDB2\\Model\\ModelInterface' not found in wp-content/plugins/decalog/includes/libraries/influxdb/Model/HealthCheck.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'InfluxDB2\\Model\\ModelInterface' not found in wp-content/plugins/decalog/includes/libraries/influxdb/Model/RenamableField.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'InfluxDB2\\Model\\Threshold' not found in wp-content/plugins/decalog/includes/libraries/influxdb/Model/RangeThreshold.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Thrift\\Type\\TConstant' not found in wp-content/plugins/decalog/includes/libraries/jaeger/Thrift/Agent/Zipkin/Constant.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/decalog/admin/partials/decalog-admin-view-traces-bottom.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: error reporting, logs, monitoring, tracing, logging

decalog/decalog.php Passed 13 tests

The main PHP script in "DecaLog" version 3.9.0 is automatically included on every request by WordPress
95 characters long description:
Capture and log events, metrics and traces on your site. Make WordPress observable – finally!

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin168,277 lines of code in 1,668 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,34732,222104,255160,400
SVG283004,167
Markdown1245201,343
JavaScript11226321,173
CSS13241301,141
JSON20053

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,166)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.19
▷ Minimum class complexity1.00
▷ Maximum class complexity1,166.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces124
Interfaces84
Traits30
Classes1,181
▷ Abstract classes352.96%
▷ Concrete classes1,14697.04%
▷ Final classes948.20%
Methods12,142
▷ Static methods1,77314.60%
▷ Public methods10,49686.44%
▷ Protected methods8677.14%
▷ Private methods7796.42%
Functions1,095
▷ Named functions968.77%
▷ Anonymous functions99991.23%
Constants893
▷ Global constants788.73%
▷ Class constants81591.27%
▷ Public constants76493.74%

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
There are no PNG files in this plugin