10% drive-wp

Code Review | Drive Wp

WordPress plugin Drive Wp scored10%from 54 tests.

About plugin

  • Plugin page: drive-wp
  • Plugin version: 0.5.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Jun 8, 2021
  • Latest release: Nov 15, 2022
  • Number of updates: 5
  • Update frequency: every 105.0 days
  • Top authors: theripper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /386 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/drive-wp/wp-drive.php+88
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼2.12MB] [CPU: ▼56.99ms] Passed 4 tests

This is a short check of server-side resources used by Drive Wp
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.594.66 ▼42.82
Dashboard /wp-admin2.16 ▼1.409.28 ▼44.33
Posts /wp-admin/edit.php2.16 ▼1.526.55 ▼42.75
Add New Post /wp-admin/post-new.php2.16 ▼3.986.22 ▼98.04
Media Library /wp-admin/upload.php2.16 ▼1.337.22 ▼34.97

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 8 new options
New WordPress options
wp_drive_db_ver
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
recovery_mode_email_last_sent
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Drive Wp
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▼0.421.78 ▼0.2739.86 ▼3.67
Dashboard /wp-admin2,202 ▲315.64 ▼0.0193.94 ▼7.7040.25 ▼4.55
Posts /wp-admin/edit.php2,104 ▲12.03 ▼0.0639.64 ▲2.9435.58 ▲0.36
Add New Post /wp-admin/post-new.php1,548 ▲2223.24 ▲5.74672.42 ▲14.0952.37 ▼1.61
Media Library /wp-admin/upload.php1,404 ▲44.15 ▼0.15115.59 ▲6.2351.18 ▲6.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/drive-wp/wp-drive.php+88
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • wp_drive_db_ver

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
Everything seems fine, however this is by no means 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: change attachment file, rest api, windows drive

drive-wp/wp-drive.php 77% from 13 tests

"Drive Wp" version 0.5.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: Please rename the main PHP file in this plugin to the plugin slug ("drive-wp.php" instead of "wp-drive.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 182 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin459 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4124123418
PO File161241

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.33
▷ Minimum class complexity3.00
▷ Maximum class complexity43.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods722.58%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.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
PNG images were not found in this plugin