10% label-grid-tools

Code Review | LabelGrid Tools

WordPress plugin LabelGrid Tools scored10%from 54 tests.

About plugin

  • Plugin page: label-grid-tools
  • Plugin version: 1.3.48
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 2, 2019
  • Latest release: Nov 13, 2023
  • Number of updates: 203
  • Update frequency: every 8.7 days
  • Top authors: labelgrid (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /5,690 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > User error in wp-content/plugins/label-grid-tools/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16.

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

An overview of server-side resources used by LabelGrid Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.38 ▲0.54
Dashboard /wp-admin3.31 ▲0.0046.86 ▼0.21
Posts /wp-admin/edit.php3.36 ▲0.0048.54 ▼0.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.83 ▼9.12
Media Library /wp-admin/upload.php3.23 ▲0.0035.22 ▼0.56

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

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

Browser metrics Passed 4 tests

Checking browser requirements for LabelGrid Tools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▼0.031.66 ▼0.0137.69 ▼6.27
Dashboard /wp-admin2,198 ▲205.64 ▼0.0188.65 ▼8.9438.85 ▼0.02
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0837.48 ▼3.7836.30 ▼1.57
Add New Post /wp-admin/post-new.php1,526 ▼023.01 ▲0.02684.63 ▲58.2351.95 ▲3.85
Media Library /wp-admin/upload.php1,400 ▲34.17 ▲0.0694.92 ▼3.4641.71 ▼0.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/label-grid-tools/public/partials/labelgrid-tools-public-display.php
    • > /wp-content/plugins/label-grid-tools/public/templates/lite_release.php
    • > /wp-content/plugins/label-grid-tools/public/templates/lite_gate.php
    • > /wp-content/plugins/label-grid-tools/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 280× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/label-grid-tools/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\GroupHandler' not found in wp-content/plugins/label-grid-tools/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/label-grid-tools/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Format_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/label-grid-tools/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/label-grid-tools/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/label-grid-tools/vendor/htmlburger/carbon-fields/core/Field/Predefined_Options_Field.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/label-grid-tools/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Textarea_Field' not found in wp-content/plugins/label-grid-tools/vendor/htmlburger/carbon-fields/core/Field/Rich_Text_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/label-grid-tools/includes/class-labelgrid-tools.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/label-grid-tools/vendor/guzzlehttp/psr7/src/MultipartStream.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

label-grid-tools/labelgrid-tools.php 77% from 13 tests

The primary PHP file in "LabelGrid Tools" version 1.3.48 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 184 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("label-grid-tools.php" instead of "labelgrid-tools.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin378,736 lines of code in 1,421 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript79325,43114,216301,575
PHP4348,00220,13549,259
JSON27008,775
Markdown372,06205,671
SVG2825264,412
CSS145141,1552,827
PO File268191,0202,202
TypeScript43822492,056
Sass4833901,769
YAML7285116
Bourne Shell112037
XML10027
Dockerfile18010

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.93
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces50
Interfaces40
Traits10
Classes330
▷ Abstract classes185.45%
▷ Concrete classes31294.55%
▷ Final classes309.62%
Methods2,487
▷ Static methods29611.90%
▷ Public methods1,92977.56%
▷ Protected methods34413.83%
▷ Private methods2148.60%
Functions287
▷ Named functions9834.15%
▷ Anonymous functions18965.85%
Constants291
▷ Global constants8328.52%
▷ Class constants20871.48%
▷ Public constants18187.02%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.24MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
public/css/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
public/css/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%
public/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
public/images/artists_placeholder.png211.49KB131.57KB▼ 37.79%