84% embedtables-embed-google-sheets-on-a-website

Code Review | EmbedTables - Embed Google Sheets on website

WordPress plugin EmbedTables - Embed Google Sheets on website scored 84% from 54 tests.

About plugin

  • Plugin page: embedtables-embed...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Apr 2, 2021
  • Latest release: Apr 2, 2021
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: embedtables (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 627 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
The plugin installed gracefully, with no errors

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

Server-side resources used by EmbedTables - Embed Google Sheets on website
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.37 ▼4.97
Dashboard /wp-admin3.31 ▲0.0149.32 ▼1.03
Posts /wp-admin/edit.php3.36 ▲0.0153.01 ▲1.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.35 ▼22.39
Media Library /wp-admin/upload.php3.24 ▲0.0134.83 ▼2.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

EmbedTables - Embed Google Sheets on website: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲13413.39 ▼1.0111.35 ▲8.8850.39 ▲4.65
Dashboard /wp-admin2,224 ▲365.89 ▲0.08129.36 ▲19.5767.61 ▲8.50
Posts /wp-admin/edit.php2,110 ▲212.00 ▲0.0135.73 ▼3.9032.89 ▼6.42
Add New Post /wp-admin/post-new.php1,530 ▲1623.13 ▼0.64746.43 ▲24.2151.81 ▼3.91
Media Library /wp-admin/upload.php1,400 ▲124.18 ▼0.0094.78 ▼22.7081.07 ▲31.67

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/embedtables-embed-google-sheets-on-a-website/admin/view.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embedtables-embed-google-sheets-on-a-website/embed-tables.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: google sheets, airtable

embedtables-embed-google-sheets-on-a-website/embed-tables.php 92% from 13 tests

The primary PHP file in "EmbedTables - Embed Google Sheets on website" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("embedtables-embed-google-sheets-on-a-website.php" instead of "embed-tables.php")

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
No dangerous file extensions were detected181 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2108181

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 3.24MB with 2.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/new/step-3.png64.29KB27.77KB▼ 56.80%
admin/images/already-have/step-2.png64.29KB27.77KB▼ 56.80%
admin/images/already-have/step-1.png173.18KB41.55KB▼ 76.01%
admin/images/new/step-1.png266.35KB68.38KB▼ 74.33%
admin/images/new/step-2.png567.37KB163.80KB▼ 71.13%