89% drivr-google-drive-file-picker

Code Review | Drivr Lite - Google Drive Plugin

WordPress plugin Drivr Lite - Google Drive Plugin scored 89% from 54 tests.

About plugin

  • Plugin page: drivr-google-driv...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Sep 2, 2016
  • Latest release: Aug 31, 2018
  • Number of updates: 9
  • Update frequency: every 81.0 days
  • Top authors: awsmin (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active / 14,201 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.10ms] Passed 4 tests

This is a short check of server-side resources used by Drivr Lite - Google Drive Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.39 ▼5.24
Dashboard /wp-admin3.38 ▲0.0846.05 ▼2.29
Posts /wp-admin/edit.php3.49 ▲0.1445.84 ▼2.10
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.22 ▼6.75
Media Library /wp-admin/upload.php3.34 ▲0.1137.98 ▲2.63
Drivr Lite /wp-admin/options-general.php?page=drivr-settings-free3.3332.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Drivr Lite - Google Drive Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.071.73 ▼0.3444.18 ▼0.14
Dashboard /wp-admin2,207 ▲195.80 ▲0.9193.92 ▼18.6540.06 ▼0.50
Posts /wp-admin/edit.php2,093 ▲12.03 ▼0.0834.96 ▼0.5830.68 ▼4.59
Add New Post /wp-admin/post-new.php6,575 ▲5,04225.29 ▲2.19932.41 ▲258.5256.07 ▲1.08
Media Library /wp-admin/upload.php1,441 ▲504.28 ▲0.0796.95 ▼0.3775.44 ▲28.39
Drivr Lite /wp-admin/options-general.php?page=drivr-settings-free1,2282.1039.9346.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: google drive, drive, embed pdf, gdrive, embed drive...

drivr-google-drive-file-picker/drivr-lite.php 85% from 13 tests

The principal PHP file in "Drivr Lite - Google Drive Plugin" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("drivr-google-drive-file-picker.php" instead of "drivr-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,934 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS21603857
PHP319115646
JavaScript281409
SVG20020
Markdown1002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions3
▷ Named functions3100.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
18 PNG files occupy 0.34MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/images.png4.09KB1.82KB▼ 55.60%
screenshot-1.png63.28KB20.78KB▼ 67.17%
screenshot-4.png51.29KB14.48KB▼ 71.76%
images/audio.png3.88KB1.58KB▼ 59.35%
images/awsm-logo.png9.35KB4.69KB▼ 49.81%