83% gravity-forms-to-excel-addon

Code Review | Gravity Forms To Excel AddOn

WordPress plugin Gravity Forms To Excel AddOn scored83%from 54 tests.

About plugin

  • Plugin page: gravity-forms-to-...
  • Plugin version: 0.1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.4.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2015
  • Latest release: Mar 5, 2016
  • Number of updates: 26
  • Update frequency: every 9.4 days
  • Top authors: winball (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /8,394 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.00MB] [CPU: ▼4.85ms] Passed 4 tests

Server-side resources used by Gravity Forms To Excel AddOn
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.84 ▼1.13
Dashboard /wp-admin3.31 ▲0.0046.12 ▼0.78
Posts /wp-admin/edit.php3.36 ▲0.0049.74 ▼6.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.40 ▼11.27
Media Library /wp-admin/upload.php3.23 ▲0.0036.44 ▲3.56

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 242 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms To Excel AddOn
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.62 ▼1.184.89 ▲3.0043.02 ▼4.63
Dashboard /wp-admin2,203 ▲125.88 ▲0.9898.95 ▼16.6040.80 ▲1.55
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.09 ▲0.3332.70 ▼3.25
Add New Post /wp-admin/post-new.php1,544 ▲3018.37 ▲0.86627.39 ▼59.0262.40 ▲7.03
Media Library /wp-admin/upload.php1,385 ▼04.17 ▼0.0996.70 ▼7.4239.72 ▼4.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 86× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPEXCEL_ROOTPHPExcel/Shared/trend/linearBestFitClass.php' (include_path='.:/usr/share/php') in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Shared/trend/trendClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_IComparable' not found in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Comment.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/CachedObjectStorage/Memcache.php:36
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Shared/trend/powerBestFitClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_Reader_IReader' not found in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Reader/Abstract.php:36
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Shared/trend/polynomialBestFitClass.php on line 29
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/linearBestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Shared/trend/trendClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Abstract' not found in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Writer/CSV.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Style.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/gravity-forms-to-excel-addon/includes/PHPExcel/Writer/Excel2007/Style.php:36

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

gravity-forms-to-excel-addon/gf2excel-addon.php 85% from 13 tests

This is the main PHP file of "Gravity Forms To Excel AddOn" version 0.1.5.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gravity-forms-to-excel-addon.php" instead of "gf2excel-addon.php")

Code Analysis 95% from 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 plugin51,448 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
PHP19111,56835,60251,200
PO File22868231
JavaScript171416
JSON1001
CSS1080

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,176)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity55.26
▷ Minimum class complexity1.00
▷ Maximum class complexity1,176.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes181
▷ Abstract classes63.31%
▷ Concrete classes17596.69%
▷ Final classes00.00%
Methods2,719
▷ Static methods62122.84%
▷ Public methods2,21581.46%
▷ Protected methods311.14%
▷ Private methods47317.40%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants800
▷ Global constants11914.88%
▷ Class constants68185.12%
▷ Public constants681100.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