56% stylish-google-sheet-reader

Code Review | Stylish Google Sheet Reader - Embed Google Sheets As Responsive Data Tables

WordPress plugin Stylish Google Sheet Reader - Embed Google Sheets As Responsive Data Tables scored56%from 54 tests.

About plugin

  • Plugin page: stylish-google-sh...
  • Plugin version: 3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 22, 2021
  • Latest release: Apr 8, 2023
  • Number of updates: 71
  • Update frequency: every 8.8 days
  • Top authors: wppluginboxdev (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

600+ active /8,218 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.89MB] [CPU: ▼32.45ms] Passed 4 tests

Analyzing server-side resources used by Stylish Google Sheet Reader - Embed Google Sheets As Responsive Data Tables
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.79 ▼4.74
Dashboard /wp-admin3.05 ▼0.2523.01 ▼25.46
Posts /wp-admin/edit.php3.05 ▼0.3126.56 ▼20.85
Add New Post /wp-admin/post-new.php3.05 ▼2.8425.10 ▼69.06
Media Library /wp-admin/upload.php3.05 ▼0.1819.66 ▼14.44
Manage Sheets /wp-admin/admin.php?page=SGSR_ManageSheets3.0524.59
Upgrade to Pro /wp-admin/admin.php?page=SGSR_upgrade3.0530.40
Stylish Google Sheet Reader /wp-admin/admin.php?page=MAINMENUSGSR3.0525.84
Support /wp-admin/admin.php?page=SupportSGSR3.0524.50

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 42 new files
Database: 1 new table, 6 new options
New tables
wp_stylish_gsr1
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stylish Google Sheet Reader - Embed Google Sheets As Responsive Data Tables
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲10314.79 ▲0.412.06 ▲0.1140.26 ▼4.93
Dashboard /wp-admin2,238 ▲505.83 ▲0.9398.23 ▼5.6941.87 ▼1.16
Posts /wp-admin/edit.php2,124 ▲352.06 ▲0.0540.19 ▼2.4036.91 ▲2.35
Add New Post /wp-admin/post-new.php1,563 ▲3523.25 ▲4.78657.47 ▲32.7853.96 ▼3.10
Media Library /wp-admin/upload.php1,426 ▲384.15 ▼0.0695.17 ▼2.7444.50 ▲3.34
Manage Sheets /wp-admin/admin.php?page=SGSR_ManageSheets2,0572.0942.9774.23
Upgrade to Pro /wp-admin/admin.php?page=SGSR_upgrade1,0302.5540.8343.90
Stylish Google Sheet Reader /wp-admin/admin.php?page=MAINMENUSGSR8842.0735.8835.98
Support /wp-admin/admin.php?page=SupportSGSR9782.2034.7434.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SupportSGSR
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/stylish-google-sheet-reader/Pages/activation.php
    • > /wp-content/plugins/stylish-google-sheet-reader/Pages/manage_sheets.php
    • > /wp-content/plugins/stylish-google-sheet-reader/Pages/pro.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/stylish-google-sheet-reader/SGSR.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/stylish-google-sheet-reader/Pages/info/info.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SGSR_GETAllData() in wp-content/plugins/stylish-google-sheet-reader/Pages/manage_sheets.php:313
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/stylish-google-sheet-reader/Pages/support.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SupportSGSR
    • > Javascript (severe) in unknown
    /wp-content/plugins/stylish-google-sheet-reader/JS/pages.js?ver=2 2:55 Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')
    • > GET request to /wp-admin/admin.php?page=SGSR_ManageSheets
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=SGSR_ManageSheets - Access to XMLHttpRequest at 'https://wppluginbox.com/API/SGSR/starter/update.php' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SupportSGSR
    • > Network (severe)
    https://wppluginbox.com/API/SGSR/starter/update.php - Failed to load resource: net::ERR_FAILED
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SupportSGSR
    • > Javascript (severe) in unknown
    /wp-content/plugins/stylish-google-sheet-reader/JS/info.js?ver=2 15:13 Uncaught TypeError: Cannot set properties of undefined (setting 'onclick')
    • > GET request to /wp-admin/admin.php?page=SGSR_upgrade
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=SGSR_upgrade - Access to XMLHttpRequest at 'https://wppluginbox.com/API/SGSR/starter/update.php' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/admin.php?page=MAINMENUSGSR
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=MAINMENUSGSR - Access to XMLHttpRequest at 'https://wppluginbox.com/API/SGSR/starter/update.php' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/admin.php?page=SupportSGSR
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=SupportSGSR - Access to XMLHttpRequest at 'https://wppluginbox.com/API/SGSR/starter/update.php' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

stylish-google-sheet-reader/SGSR.php 77% from 13 tests

The main PHP script in "Stylish Google Sheet Reader - Embed Google Sheets As Responsive Data Tables" version 3.6 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("stylish-google-sheet-reader.php" instead of "SGSR.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 213 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,494 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS7153591,607
PHP925331717
JavaScript10240165
SVG5005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 1.45MB with 0.84MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Pages/info/info-1.PNG45.57KB16.22KB▼ 64.41%
Pages/info/screenshot-4.png308.32KB105.08KB▼ 65.92%
skin/icon/searchicon.png0.84KB0.46KB▼ 45.23%
JS/tipx/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
Pages/info/clear-cache-2.PNG879.51KB237.26KB▼ 73.02%