78% kristall-integration

Code Review | Kristall Integration Plugin for WordPress

WordPress plugin Kristall Integration Plugin for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: kristall-integration
  • Plugin version: 3.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2022
  • Latest release: Apr 4, 2023
  • Number of updates: 17
  • Update frequency: every 18.0 days
  • Top authors: fas27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,129 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.27MB] [CPU: ▲5.51ms] Passed 4 tests

Analyzing server-side resources used by Kristall Integration Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.66 ▲1.2045.00 ▲4.35
Dashboard /wp-admin4.67 ▲1.3657.25 ▲6.68
Posts /wp-admin/edit.php4.70 ▲1.3458.36 ▲9.87
Add New Post /wp-admin/post-new.php7.16 ▲1.27100.33 ▲1.13
Media Library /wp-admin/upload.php4.50 ▲1.2745.10 ▲11.74

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,840 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Kristall Integration Plugin for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,141 ▲38417.14 ▲2.785.62 ▲3.4239.52 ▼12.75
Dashboard /wp-admin2,421 ▲2367.79 ▲2.96161.38 ▲43.2543.52 ▼1.95
Posts /wp-admin/edit.php2,491 ▲3995.18 ▲3.1767.34 ▲31.6335.11 ▼2.08
Add New Post /wp-admin/post-new.php1,574 ▲6022.97 ▲5.27583.04 ▼80.0535.72 ▼21.66
Media Library /wp-admin/upload.php1,631 ▲2465.38 ▲1.19100.30 ▲0.3942.22 ▼2.18

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/kristall-integration/connector/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/kristall-integration/connector/vendor/markbaker/complex/examples/testOperations.php
    • > /wp-content/plugins/kristall-integration/connector/vendor/markbaker/complex/examples/testFunctions.php
    • > /wp-content/plugins/kristall-integration/connector/vendor/markbaker/complex/examples/complexTest.php
  • 640× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader' not found in wp-content/plugins/kristall-integration/connector/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpWord\\Writer\\ODText\\Part\\AbstractPart' not found in wp-content/plugins/kristall-integration/connector/vendor/phpoffice/phpword/src/PhpWord/Writer/ODText/Part/Manifest.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef_URI_IPv4' not found in wp-content/plugins/kristall-integration/connector/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/IPv6.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/kristall-integration/connector/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpWord\\Reader\\Word2007\\AbstractPart' not found in wp-content/plugins/kristall-integration/connector/vendor/phpoffice/phpword/src/PhpWord/Reader/Word2007/Settings.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Pdf' not found in wp-content/plugins/kristall-integration/connector/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpWord\\Writer\\HTML\\Style\\AbstractStyle' not found in wp-content/plugins/kristall-integration/connector/vendor/phpoffice/phpword/src/PhpWord/Writer/HTML/Style/Font.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\Common\\Adapter\\Zip\\ZipInterface' not found in wp-content/plugins/kristall-integration/connector/vendor/phpoffice/common/src/Common/Adapter/Zip/PclZipAdapter.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/kristall-integration/connector/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php:17
    • > PHP Warning
      Use of undefined constant KRISTALL_INTEGRATION_MAIN_DIR - assumed 'KRISTALL_INTEGRATION_MAIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/kristall-integration/public/class-kristall-integration-shortcodes.php on line 2

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: print, e-commerce, woocommerce, shop, yml

kristall-integration/kristall-integration.php 92% from 13 tests

"Kristall Integration Plugin for WordPress" version 3.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 605 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin209,933 lines of code in 1,341 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,11230,52881,371154,619
JavaScript1125,56511,92242,743
CSS294233017,262
Markdown3469502,056
JSON18001,824
SVG209301,060
YAML83116180
XML6206160
Bourne Shell111028
INI1111

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,396)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity25.17
▷ Minimum class complexity1.00
▷ Maximum class complexity1,396.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces105
Interfaces35
Traits0
Classes931
▷ Abstract classes636.77%
▷ Concrete classes86893.23%
▷ Final classes212.42%
Methods7,776
▷ Static methods1,28916.58%
▷ Public methods5,51670.94%
▷ Protected methods1,02213.14%
▷ Private methods1,23815.92%
Functions286
▷ Named functions24083.92%
▷ Anonymous functions4616.08%
Constants1,752
▷ Global constants1699.65%
▷ Class constants1,58390.35%
▷ Public constants1,56698.93%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
103 compressed PNG files occupy 1.31MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
connector/assets/images/connector_sub/dimension.png0.48KB0.48KB0.00%
connector/assets/images/resize.png0.08KB0.11KB0.00%
connector/assets/images/edit_onlineconvert.png0.91KB0.91KB0.00%
connector/assets/images/no_photo.png4.13KB2.42KB▼ 41.32%
connector/assets/images/edit_tinymce.png0.24KB0.25KB0.00%