83% shortcode-addons-for-google-sheet-api

Code Review | Gsheet Contact Addons & ShortCode

WordPress plugin Gsheet Contact Addons & ShortCode scored83%from 54 tests.

About plugin

  • Plugin page: shortcode-addons-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 4, 2021
  • Latest release: Aug 4, 2021
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: webnganh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.05MB] [CPU: ▼2.38ms] Passed 4 tests

This is a short check of server-side resources used by Gsheet Contact Addons & ShortCode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.55 ▲1.0940.28 ▼2.42
Dashboard /wp-admin4.39 ▲1.0848.64 ▲1.81
Posts /wp-admin/edit.php4.44 ▲1.0851.74 ▲8.37
Add New Post /wp-admin/post-new.php6.90 ▲1.0282.23 ▼17.26
Media Library /wp-admin/upload.php4.25 ▲1.0243.94 ▲10.11

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 1,093 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Gsheet Contact Addons & ShortCode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.56 ▼0.631.74 ▼0.6339.17 ▼6.38
Dashboard /wp-admin2,209 ▲215.86 ▲1.00106.87 ▲3.3837.53 ▼4.40
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0439.39 ▲3.8933.80 ▲4.38
Add New Post /wp-admin/post-new.php1,542 ▲2318.22 ▼4.87613.49 ▼69.2156.34 ▼7.27
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.0799.62 ▲0.9443.54 ▼0.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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
The following issues need your attention
  • 695× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/guzzlehttp/psr7/src/CachingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\Rijndael' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php:59
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/google/apiclient-services/src/Sheets/AddBandingResponse.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/google/apiclient-services/src/Sheets/IterativeCalculationSettings.php:20
    • > PHP Warning
      Class 'Google\\Task\\Runner' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/google/apiclient/src/aliases.php on line 33
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/google/apiclient-services/src/Sheets/ChartCustomNumberFormatOptions.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\Common\\Formats\\Keys\\PuTTY' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Service\\Resource' not found in wp-content/plugins/shortcode-addons-for-google-sheet-api/inc/lib/vendor/google/apiclient-services/src/Drive/Resource/Revisions.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: google sheets integrations, sheets, cf7, contact form 7 integrations, google...

shortcode-addons-for-google-sheet-api/ifnt-Gsheet.php 77% from 13 tests

This is the main PHP file of "Gsheet Contact Addons & ShortCode" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shortcode-addons-for-google-sheet-api.php" instead of "ifnt-Gsheet.php")
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "5.6")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% 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 plugin81,013 lines of code in 1,043 files:
LanguageFilesBlank linesComment linesLines of code
PHP97813,05849,94573,666
Markdown291,75105,163
JSON21001,795
YAML7311143
Python1222572
CSS11071
JavaScript16050
XML30041
make1409
Bourne Shell1203

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.74
▷ Minimum class complexity1.00
▷ Maximum class complexity660.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces81
Interfaces44
Traits14
Classes953
▷ Abstract classes21422.46%
▷ Concrete classes73977.54%
▷ Final classes395.28%
Methods6,014
▷ Static methods66611.07%
▷ Public methods5,10884.94%
▷ Protected methods3956.57%
▷ Private methods5118.50%
Functions195
▷ Named functions5628.72%
▷ Anonymous functions13971.28%
Constants525
▷ Global constants163.05%
▷ Class constants50996.95%
▷ Public constants48895.87%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin