84% drive-folder-embeder

Code Review | Drive Folder Embedder

WordPress plugin Drive Folder Embedder scored 84% from 54 tests.

About plugin

  • Plugin page: drive-folder-embeder
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2020
  • Latest release: May 28, 2022
  • Number of updates: 6
  • Update frequency: every 89.3 days
  • Top authors: azumbro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,388 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Drive Folder Embedder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.44 ▼0.44
Dashboard /wp-admin3.32 ▲0.0146.83 ▲1.65
Posts /wp-admin/edit.php3.37 ▲0.0146.47 ▼0.88
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.55 ▼16.66
Media Library /wp-admin/upload.php3.24 ▲0.0134.76 ▲1.96

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Drive Folder Embedder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼0.961.80 ▲0.0245.74 ▲6.02
Dashboard /wp-admin2,206 ▲215.80 ▼0.0794.76 ▼8.7137.15 ▼2.65
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0335.85 ▼4.3631.58 ▼2.79
Add New Post /wp-admin/post-new.php1,540 ▲1218.35 ▲0.13631.79 ▼13.1757.04 ▲7.15
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0494.16 ▼2.9140.93 ▼1.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/drive-folder-embeder/driveFolderEmbedder.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: google drive, folder embed

drive-folder-embeder/driveFolderEmbedder.php 92% from 13 tests

"Drive Folder Embedder" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("drive-folder-embeder.php" instead of "driveFolderEmbedder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12765

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/DriveFolderEmbedderLogo.png56.17KB20.12KB▼ 64.18%