84% legal-texts-connector-it-recht-kanzlei

Code Review | Legal Text Connector of the IT-Recht Kanzlei

WordPress plugin Legal Text Connector of the IT-Recht Kanzlei scored84%from 54 tests.

About plugin

  • Plugin page: legal-texts-conne...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Jun 7, 2022
  • Latest release: Nov 19, 2023
  • Number of updates: 32
  • Update frequency: every 20.4 days
  • Top authors: itrechtkanzlei (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

6,000+ active /30,256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.37MB] [CPU: ▲0.48ms] Passed 4 tests

A check of server-side resources used by Legal Text Connector of the IT-Recht Kanzlei
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3939.53 ▲1.26
Dashboard /wp-admin3.70 ▲0.3945.78 ▼4.81
Posts /wp-admin/edit.php3.75 ▲0.3949.35 ▲4.93
Add New Post /wp-admin/post-new.php6.24 ▲0.3594.30 ▲1.93
Media Library /wp-admin/upload.php3.56 ▲0.3334.16 ▲3.53
IT-Recht Kanzlei /wp-admin/options-general.php?page=legal_texts_connector_settings3.5431.61

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
itrk_lti_setup_status
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Legal Text Connector of the IT-Recht Kanzlei
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.57 ▲0.311.68 ▼0.0942.99 ▼2.75
Dashboard /wp-admin2,199 ▲215.65 ▼0.1393.17 ▼21.8141.00 ▼2.42
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0040.97 ▲4.3636.01 ▲5.26
Add New Post /wp-admin/post-new.php1,538 ▲1218.38 ▼4.79609.75 ▼53.9567.69 ▲18.30
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0098.06 ▲1.0640.28 ▼3.06
IT-Recht Kanzlei /wp-admin/options-general.php?page=legal_texts_connector_settings9232.0123.5332.47

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • itrk_lti_setup_status
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'ITRechtKanzlei\\LTIResult' not found in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/sdk/LTIErrorResult.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/views/settings-header.php:25
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/views/message.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ITRechtKanzlei\\LTIResult' not found in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/sdk/LTIAccountListResult.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ITRechtKanzlei\\LTIResult' not found in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/sdk/LTIPushResult.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ITRechtKanzlei\\LegalTextsConnector\\ShortCodes' not found in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/views/settings-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/views/login.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/views/messages.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ITRechtKanzlei\\LTIResult' not found in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/sdk/LTIVersionResult.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/legal-texts-connector-it-recht-kanzlei/src/views/uninstall-old-plugin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: rechtstexte, agb, abmahnsicher, impressum, datenschutz

legal-texts-connector-it-recht-kanzlei/legal-texts-connector-it-recht-kanzlei.php 92% from 13 tests

"Legal Text Connector of the IT-Recht Kanzlei" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,392 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP283362151,902
PO File2256350689
SVG200405
CSS1276396

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.65
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods117
▷ Static methods3328.21%
▷ Public methods9581.20%
▷ Protected methods97.69%
▷ Private methods1311.11%
Functions13
▷ Named functions00.00%
▷ Anonymous functions13100.00%
Constants51
▷ Global constants11.96%
▷ Class constants5098.04%
▷ Public constants4998.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin