10% wp-pde

Code Review | WpPDE

WordPress plugin WpPDE scored 10% from 54 tests.

About plugin

  • Plugin page: wp-pde
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 5.8.1
  • First release: Apr 4, 2012
  • Latest release: Oct 7, 2012
  • Number of updates: 17
  • Update frequency: every 12.1 days
  • Top authors: kdmurthy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,191 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-pde/main/pde-plugin.php+1894
    Declaration of Walker_PDE_Duplicate::start_lvl(&$output) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array)

Server metrics [RAM: ▼1.19MB] [CPU: ▼185.18ms] Passed 4 tests

An overview of server-side resources used by WpPDE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.44 ▼0.4010.65 ▼24.21
Dashboard /wp-admin2.46 ▼0.607.24 ▼37.86
Posts /wp-admin/edit.php2.46 ▼0.657.06 ▼37.54
Add New Post /wp-admin/post-new.php2.46 ▼2.987.77 ▼638.40
Media Library /wp-admin/upload.php2.46 ▼0.547.15 ▼26.91

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 551 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WpPDE
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲12515.90 ▼0.158.05 ▼2.8447.20 ▼0.52
Dashboard /wp-admin2,979 ▲485.94 ▼0.01127.35 ▼10.53136.68 ▲17.67
Posts /wp-admin/edit.php2,759 ▲202.74 ▲0.0162.48 ▼0.9893.94 ▲5.46
Add New Post /wp-admin/post-new.php1,685 ▲1518.86 ▼0.34387.47 ▲7.64111.21 ▼1.67
Media Library /wp-admin/upload.php1,767 ▼435.01 ▼0.02130.20 ▼8.20141.86 ▲27.33

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-pde/main/pde-plugin.php+1894
    Declaration of Walker_PDE_Duplicate::start_lvl(&$output) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array)

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-pde/main/js/ace-builds/kitchen-sink/docs/php.php
    • > /wp-content/plugins/wp-pde/main/plupload.php
  • 69× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_style() on null in wp-content/plugins/wp-pde/main/templates/form-item-markup-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-pde/main/templates/form-item-widget-parameters.php:4
    • > PHP Notice
      Undefined variable: item_id in wp-content/plugins/wp-pde/main/templates/form-item-radio.php on line 3
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/wp-pde/main/templates/form-item-radio-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-pde/main/export.php:44
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/wp-pde/main/templates/form-item-label-form.php on line 2
    • > PHP Notice
      Undefined variable: item_id in wp-content/plugins/wp-pde/main/templates/form-item-dropdown.php on line 3
    • > PHP Notice
      Undefined variable: item_id in wp-content/plugins/wp-pde/main/templates/form-item-label.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-pde/main/pde-date-picker.php:104
    • > PHP Notice
      Undefined variable: export_mode in wp-content/plugins/wp-pde/main/templates/plugin.php.php on line 4

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (WpPDE screen.), #2 (Defining widget parameters.), #3 (A widget with form items added.), #4 (The editor)
Please take inspiration from this readme.txt

wp-pde/wp-pde.php Passed 13 tests

This is the main PHP file of "WpPDE" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Plugin development environment for Wordpress

Code Analysis 3% from 3 tests

File types 0% from 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
Please fix the following items
  • Do not distribute dangerous files with your plugin
    • .ps1 - Windows PowerShell Cmdlet in Windows
      • wp-content/plugins/wp-pde/main/js/ace-builds/kitchen-sink/docs/powershell.ps1
221,387 lines of code in 482 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36838,14826,267209,354
PHP471,4752,2278,117
CSS103241881,868
HTML77310803
Markdown182590469
Bourne Shell222574
SVG19074
JSON10066
Scala17161
liquid118058
XML10055
diff152935
Tcl/Tk15530
Groovy111129
YAML15228
Perl14325
Go14822
LESS16220
Lua171019
TeX11219
PowerShell15118
CoffeeScript13316
Sass14016
Haxe11115
Clojure11414
GLSL14313
Python13313
C++12110
OCaml13510
Ruby1219
Java1276
SQL1006
JSX1045
XQuery1105
C#1013
ColdFusion1212

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 120)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity39.67
▷ Minimum class complexity1.00
▷ Maximum class complexity257.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity120.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods330
▷ Static methods13039.39%
▷ Public methods31695.76%
▷ Protected methods113.33%
▷ Private methods30.91%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants1150.00%
▷ Class constants1150.00%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 PNG files occupy 0.95MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
main/js/select2/select2.png0.60KB0.99KB0.00%
screenshot-3.png32.56KB7.42KB▼ 77.21%
main/styles/smoothness/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
main/js/ace-builds/textarea/images/body_background.png2.94KB0.58KB▼ 80.32%
main/images/arrows-dark.png0.48KB0.24KB▼ 51.11%