78% dragdropr

Code Review | DragDropr - Visual Drag & Drop Page Builder

WordPress plugin DragDropr - Visual Drag & Drop Page Builder scored78%from 54 tests.

About plugin

  • Plugin page: dragdropr
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0
  • WordPress version: 6.3.1
  • First release: Mar 2, 2018
  • Latest release: Nov 19, 2019
  • Number of updates: 24
  • Update frequency: every 27.3 days
  • Top authors: dragdropr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,715 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 gracefully, with no errors

Server metrics [RAM: ▲0.45MB] [CPU: ▲1.51ms] Passed 4 tests

Analyzing server-side resources used by DragDropr - Visual Drag & Drop Page Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4546.08 ▲3.61
Dashboard /wp-admin3.78 ▲0.4756.84 ▲3.10
Posts /wp-admin/edit.php3.83 ▲0.4751.92 ▲3.30
Add New Post /wp-admin/post-new.php6.36 ▲0.4892.22 ▼1.77
Media Library /wp-admin/upload.php3.64 ▲0.4138.31 ▲1.42

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by DragDropr - Visual Drag & Drop Page Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲2714.40 ▲0.012.00 ▼0.0043.74 ▼1.67
Dashboard /wp-admin2,222 ▲455.81 ▲0.2093.17 ▼14.2239.51 ▼4.24
Posts /wp-admin/edit.php2,125 ▲282.28 ▲0.2833.86 ▼4.3834.82 ▼3.03
Add New Post /wp-admin/post-new.php1,570 ▲4418.45 ▲0.93631.40 ▼44.4852.88 ▼2.06
Media Library /wp-admin/upload.php1,424 ▲274.45 ▲0.3399.43 ▼9.0245.28 ▼1.94

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dragdropr/vendor/automattic/woocommerce/tests/bootstrap.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dragdropr/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/HttpClientExceptionTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'DDR_WP_CLI_Command' not found in wp-content/plugins/dragdropr/lib/ddr-class-wp-rest-oauth1-cli.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dragdropr/vendor/automattic/woocommerce/tests/WooCommerce/Tests/ClientTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'DDR_WP_REST_Client' not found in wp-content/plugins/dragdropr/lib/ddr-class-wp-rest-oauth1-client.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dragdropr/ddr_admin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dragdropr/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/RequestTest.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function login_header() in wp-content/plugins/dragdropr/theme/ddr-oauth1-authorize.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dragdropr/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/BasicAuthTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dragdropr/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/ResponseTest.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function login_header() in wp-content/plugins/dragdropr/theme/oauth1-authorize.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in dragdropr/assets to your readme.txt
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

dragdropr/ddr-oauth-server.php 92% from 13 tests

This is the main PHP file of "DragDropr - Visual Drag & Drop Page Builder" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dragdropr.php" instead of "ddr-oauth-server.php")

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
Good job! No executable or dangerous file extensions detected3,558 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP338171,5783,241
Markdown2440122
JSON30090
JavaScript20160
XML21026
YAML26019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.36
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes00.00%
Methods186
▷ Static methods2915.59%
▷ Public methods15181.18%
▷ Protected methods3418.28%
▷ Private methods10.54%
Functions58
▷ Named functions3153.45%
▷ Anonymous functions2746.55%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/js/wysiwyg/tiny_mce/plugins/dragdropr/image/dragdropr-logo.png26.21KB12.57KB▼ 52.04%