68% observo-monitoring

Code Review | Observo Monitoring

WordPress plugin Observo Monitoring scored 68% from 54 tests.

About plugin

  • Plugin page: observo-monitoring
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0.0
  • WordPress version: 6.3.1
  • First release: Oct 1, 2020
  • Latest release: Jan 26, 2023
  • Number of updates: 7
  • Update frequency: every 122.0 days
  • Top authors: maG66 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 431 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.68MB] [CPU: ▼18.35ms] Passed 4 tests

Server-side resources used by Observo Monitoring
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.52 ▼2.14
Dashboard /wp-admin3.31 ▲0.0147.21 ▼2.39
Posts /wp-admin/edit.php3.36 ▲0.0143.11 ▼4.57
Add New Post /wp-admin/post-new.php3.13 ▼2.7636.15 ▼64.29
Media Library /wp-admin/upload.php3.24 ▲0.0133.05 ▼0.67

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 851 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
observo_sysinfo_code
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Observo Monitoring
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.14 ▼1.231.67 ▼0.2943.32 ▼0.01
Dashboard /wp-admin2,203 ▲145.79 ▲0.8497.26 ▼11.4636.47 ▼3.68
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0034.42 ▼0.5634.78 ▼0.58
Add New Post /wp-admin/post-new.php1,536 ▲723.28 ▲4.95596.84 ▼35.8147.63 ▼15.37
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0192.45 ▼11.5539.70 ▼7.70

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/language/language.php
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/read_config.php
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/index.php
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/tools/distrotest.php
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/tools/checkdistro.php
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/tools/cputest.php
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/tools/checkpng.php
    • > /wp-content/plugins/observo-monitoring/phpsysinfo_904159/xml.php
  • 61× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Sensors' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/mb/class.ipmitool.inc.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Sensors' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/mb/class.healthd.inc.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'UPS' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/ups/class.apcupsd.inc.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Sensors' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/mb/class.ipmiutil.inc.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'OS' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/os/class.Haiku.inc.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'OS' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/os/class.QNX.inc.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'UPS' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/ups/class.snmpups.inc.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Hwmon' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/mb/class.thinkpad.inc.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'OS' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/os/class.BSDCommon.inc.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'BSDCommon' not found in wp-content/plugins/observo-monitoring/phpsysinfo_904159/includes/os/class.OpenBSD.inc.php:27

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: monitoring, server

observo-monitoring/observo-monitoring.php 92% from 13 tests

"Observo Monitoring" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/observo-monitoring/phpsysinfo_904159/tools/lint.bat
63,836 lines of code in 337 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript464,1625,74721,957
XML123147817,124
PHP921,3067,31615,474
CSS35542783,783
INI73818851,824
XSLT1011,408
HTML1827511,119
Markdown62050542
XSD3372502
Bourne Shell210631
YAML14030
JSON10019
Dockerfile18713
DOS Batch10010

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 156)
Cyclomatic complexity
Average complexity per logical line of code0.71
Average class complexity53.72
▷ Minimum class complexity1.00
▷ Maximum class complexity644.00
Average method complexity7.82
▷ Minimum method complexity1.00
▷ Maximum method complexity156.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes81
▷ Abstract classes67.41%
▷ Concrete classes7592.59%
▷ Final classes00.00%
Methods676
▷ Static methods294.29%
▷ Public methods37054.73%
▷ Protected methods7511.09%
▷ Private methods23134.17%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants55
▷ Global constants4581.82%
▷ Class constants1018.18%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
152 PNG files occupy 0.26MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
phpsysinfo_904159/gfx/images/WinXP.png2.45KB1.67KB▼ 32.05%
phpsysinfo_904159/gfx/images/EasyOS.png1.72KB1.64KB▼ 4.66%
phpsysinfo_904159/gfx/images/Salix.png0.79KB0.56KB▼ 28.84%
phpsysinfo_904159/gfx/images/Darwin.png1.11KB0.75KB▼ 32.22%
phpsysinfo_904159/gfx/images/Peppermint.png2.00KB1.76KB▼ 11.88%