83% led-site-indicator

Code Review | LED-SITE-INDICATOR

WordPress plugin LED-SITE-INDICATOR scored83%from 54 tests.

About plugin

  • Plugin page: led-site-indicator
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2021
  • Latest release: Oct 23, 2023
  • Number of updates: 15
  • Update frequency: every 46.4 days
  • Top authors: tomjuggler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,321 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by LED-SITE-INDICATOR
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0933.49 ▼11.10
Dashboard /wp-admin3.42 ▲0.0744.52 ▼16.18
Posts /wp-admin/edit.php3.53 ▲0.1744.93 ▼2.31
Add New Post /wp-admin/post-new.php6.00 ▲0.1179.03 ▼21.84
Media Library /wp-admin/upload.php3.34 ▲0.1140.69 ▲2.91
LED-SITE-INDICATOR /wp-admin/options-general.php?page=led-site-indicator-settings3.3129.94

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

LED-SITE-INDICATOR: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.26 ▼0.471.56 ▼0.0640.67 ▲1.64
Dashboard /wp-admin2,193 ▲165.51 ▼0.0886.09 ▼1.1239.09 ▼1.34
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0039.15 ▲1.0137.91 ▲4.72
Add New Post /wp-admin/post-new.php1,531 ▲523.21 ▲0.09669.73 ▼5.4766.41 ▲11.90
Media Library /wp-admin/upload.php1,404 ▲74.20 ▼0.01107.13 ▼3.6647.63 ▼1.38
LED-SITE-INDICATOR /wp-admin/options-general.php?page=led-site-indicator-settings8752.1823.9927.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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      fsockopen(): unable to connect to 93.184.216.34:1883 (Connection timed out) in wp-content/plugins/led-site-indicator/lib/vendor/phpMQTT/phpMQTT.php on line 78

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: You can look at the official readme.txt

led-site-indicator/led_site_indicator.php 85% from 13 tests

The entry point to "LED-SITE-INDICATOR" version 2.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("led-site-indicator.php" instead of "led_site_indicator.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin693 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6226280656
JavaScript111523
JSON11014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity30.25
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods51
▷ Static methods00.00%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
5 PNG files occupy 0.34MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png25.92KB5.73KB▼ 77.91%
assets/banner-1544x500.png188.29KB61.56KB▼ 67.31%
assets/screenshot-1.png30.96KB12.39KB▼ 59.97%
assets/banner-772x250.png74.57KB25.12KB▼ 66.31%
assets/icon-128x128.png23.96KB4.89KB▼ 79.59%