77% gf-entries-in-excel

Code Review | GravityExport Lite for Gravity Forms

WordPress plugin GravityExport Lite for Gravity Forms scored77%from 54 tests.

About plugin

  • Plugin page: gf-entries-in-excel
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 30, 2017
  • Latest release: Sep 25, 2023
  • Number of updates: 170
  • Update frequency: every 13.1 days
  • Top authors: doekenorg (68.82%)mrcasual (17.65%)squidemdia (9.41%)gravityview (5.88%)

Code review

54 tests

User reviews

36 reviews

Install metrics

10,000+ active /235,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.42ms] Passed 4 tests

This is a short check of server-side resources used by GravityExport Lite for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.20 ▼9.82
Dashboard /wp-admin3.32 ▼0.0243.55 ▼15.18
Posts /wp-admin/edit.php3.37 ▲0.0245.43 ▼5.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.20 ▼11.27
Media Library /wp-admin/upload.php3.25 ▲0.0234.25 ▼1.30

Server storage [IO: ▲10.11MB] [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: 1,072 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for GravityExport Lite for Gravity Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.69 ▲0.331.65 ▼0.0739.80 ▼4.00
Dashboard /wp-admin2,195 ▲185.65 ▼0.0380.72 ▼7.5138.60 ▼5.62
Posts /wp-admin/edit.php2,097 ▼31.94 ▼0.0634.74 ▼3.6932.55 ▼0.14
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▼0.04647.08 ▲31.9350.09 ▲0.13
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.04101.17 ▼16.7145.37 ▼0.33

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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

SRP 0% 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 items
  • 8× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gf-entries-in-excel/uninstall.php
    • > /wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/templates/field/group.php
    • > /wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-base/templates/field/group.php
    • > /wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/tests/Template/assets/folder1/file1.php
    • > /wp-content/plugins/gf-entries-in-excel/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/tests/Template/assets/folder1/file_with_variables.php
    • > /wp-content/plugins/gf-entries-in-excel/gfexcel.php
    • > /wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/tests/Template/assets/folder2/file2.php
  • 390× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GFExcel\\Vendor\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Container\\ServiceProvider\\AbstractServiceProvider' not found in wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/src/ServiceProvider/AbstractServiceProvider.php:13
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-base/templates/field/group.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'GFExcel\\Tests\\TestCase' not found in wp-content/plugins/gf-entries-in-excel/tests/Addon/AddonTraitTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GFExcel\\Vendor\\PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\WriterPart' not found in wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/tests/Container/ContainerAwareTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GFExcel\\Vendor\\PhpOffice\\PhpSpreadsheet\\Writer\\Pdf' not found in wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/tests/Action/ActionAwareTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx\\BaseParserClass' not found in wp-content/plugins/gf-entries-in-excel/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/gf-entries-in-excel/vendor/gravitykit/gravityexport-base/tests/Action/AbstractActionTest.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (A 'GravityExport' link is added to the form settings) image missing
Please take inspiration from this readme.txt

gf-entries-in-excel/gfexcel.php 85% from 13 tests

The entry point to "GravityExport Lite for Gravity Forms" version 2.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gf-entries-in-excel.php" instead of "gfexcel.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 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin160,148 lines of code in 874 files:
LanguageFilesBlank linesComment linesLines of code
PHP81628,78371,185131,091
JSON140024,219
Markdown1456402,309
PO File4333331911
CSS31503740
Sass3722340
YAML8533271
JavaScript63129162
XML642105

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,011)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity29.20
▷ Minimum class complexity1.00
▷ Maximum class complexity1,011.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces143
Interfaces76
Traits14
Classes671
▷ Abstract classes497.30%
▷ Concrete classes62292.70%
▷ Final classes254.02%
Methods7,252
▷ Static methods1,48020.41%
▷ Public methods5,59177.10%
▷ Protected methods2573.54%
▷ Private methods1,40419.36%
Functions258
▷ Named functions12046.51%
▷ Anonymous functions13853.49%
Constants1,692
▷ Global constants80.47%
▷ Class constants1,68499.53%
▷ Public constants1,68299.88%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin