83% google-drive-embedder

Code Review | Embedder For Google Drive

WordPress plugin Embedder For Google Drive scored 83% from 54 tests.

About plugin

Code review

54 tests

User reviews

48 reviews

Install metrics

8,000+ active / 292,716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.68ms] Passed 4 tests

A check of server-side resources used by Embedder For Google Drive
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0841.25 ▼2.12
Dashboard /wp-admin3.40 ▲0.0945.19 ▼3.23
Posts /wp-admin/edit.php3.51 ▲0.1550.97 ▼0.05
Add New Post /wp-admin/post-new.php6.01 ▲0.1287.00 ▼17.31
Media Library /wp-admin/upload.php3.32 ▲0.0940.04 ▲4.78
Embedder For Google Drive /wp-admin/options-general.php?page=gdm_list_options3.2933.64

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

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

Browser metrics Passed 4 tests

Embedder For Google Drive: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲6914.47 ▲0.072.00 ▲0.0544.89 ▲2.76
Dashboard /wp-admin2,219 ▲315.91 ▲1.05103.26 ▼9.0141.99 ▼1.95
Posts /wp-admin/edit.php2,102 ▲101.99 ▼0.0340.34 ▼2.4237.41 ▼1.38
Add New Post /wp-admin/post-new.php6,934 ▲5,40124.55 ▲1.63938.15 ▲279.5437.33 ▼22.98
Media Library /wp-admin/upload.php1,401 ▲104.24 ▲0.0697.88 ▼7.1141.89 ▼1.52
Embedder For Google Drive /wp-admin/options-general.php?page=gdm_list_options8482.0225.3325.90

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/google-drive-embedder/google_drive_embedder.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

google-drive-embedder/google_drive_embedder.php 85% from 13 tests

The main file in "Embedder For Google Drive" v. 5.2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 234 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("google-drive-embedder.php" instead of "google_drive_embedder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected3,011 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74151582,093
PHP213764564
CSS46121250
PO File13132104

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity21.67
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods1841.86%
▷ Protected methods2558.14%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icalsmalltrans.png0.54KB0.42KB▼ 22.59%
images/gdm-media.png0.85KB0.76KB▼ 11.31%
images/teamdrive.png1.21KB0.12KB▼ 89.93%
images/ical.png0.64KB0.42KB▼ 34.45%
images/search.png0.42KB0.40KB▼ 5.10%