89% embed-google-drive

Code Review | Embed Google Drive

WordPress plugin Embed Google Drive scored89%from 54 tests.

About plugin

  • Plugin page: embed-google-drive
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 2, 2022
  • Latest release: Aug 23, 2023
  • Number of updates: 6
  • Update frequency: every 92.0 days
  • Top authors: pavanpatil1 (66.67%)rtcamp (50%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,683 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.01ms] Passed 4 tests

An overview of server-side resources used by Embed Google Drive
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.47 ▼3.53
Dashboard /wp-admin3.35 ▲0.0552.01 ▼3.02
Posts /wp-admin/edit.php3.40 ▲0.0446.34 ▼3.67
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.05 ▼9.80
Media Library /wp-admin/upload.php3.27 ▲0.0436.23 ▼1.55

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

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

Browser metrics Passed 4 tests

Embed Google Drive: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.461.88 ▼0.9046.03 ▼0.57
Dashboard /wp-admin2,195 ▲185.59 ▼0.0690.35 ▼2.2742.82 ▼2.19
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0538.95 ▲4.1536.56 ▼0.76
Add New Post /wp-admin/post-new.php1,526 ▼023.03 ▼0.74635.31 ▼87.3761.06 ▲7.70
Media Library /wp-admin/upload.php1,397 ▼04.19 ▲0.00100.71 ▼5.9343.47 ▼4.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: spreadsheet, google drive, drawing, embed, document

embed-google-drive/rt-google-embeds.php 85% from 13 tests

The main file in "Embed Google Drive" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("embed-google-drive.php" instead of "rt-google-embeds.php")

Code Analysis Passed 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 plugin781 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON300531
PHP354134221
PO File181029

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin