62% wp-w3d

Code Review | WP W3D plugin

WordPress plugin WP W3D plugin scored62%from 54 tests.

About plugin

  • Plugin page: wp-w3d
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2014
  • Latest release: Apr 1, 2014
  • Number of updates: 6
  • Update frequency: every 3.3 days
  • Top authors: wp-maverick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,701 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.67MB] [CPU: ▼33.04ms] Passed 4 tests

Server-side resources used by WP W3D plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2642.32 ▲6.41
Dashboard /wp-admin3.28 ▼0.0320.02 ▼27.31
Posts /wp-admin/edit.php3.28 ▼0.0822.65 ▼23.14
Add New Post /wp-admin/post-new.php3.28 ▼2.6221.89 ▼69.29
Media Library /wp-admin/upload.php3.28 ▲0.0421.86 ▼12.40
UI Elements /wp-admin/admin.php?page=wp-w3d-ui3.2820.54
Settings /wp-admin/admin.php?page=wp-w3d-settings3.2823.96
All Sliders /wp-admin/edit.php?post_type=w3dslider3.2819.48

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 147 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP W3D plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲21314.63 ▲0.281.77 ▲0.1640.92 ▼2.53
Dashboard /wp-admin2,367 ▲1876.11 ▲0.44113.53 ▲22.9440.19 ▼4.87
Posts /wp-admin/edit.php2,302 ▲2023.27 ▲1.2854.28 ▲17.3232.79 ▲1.09
Add New Post /wp-admin/post-new.php1,748 ▲22222.57 ▼0.53625.20 ▼62.7936.24 ▼14.90
Media Library /wp-admin/upload.php1,432 ▲324.17 ▲0.0093.03 ▼20.2447.55 ▼2.04
UI Elements /wp-admin/admin.php?page=wp-w3d-ui1,1862.9336.5265.85
Settings /wp-admin/admin.php?page=wp-w3d-settings9903.0839.1923.88
All Sliders /wp-admin/edit.php?post_type=w3dslider1,2903.3941.6526.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wp-w3d/includes/metabox/init.php+756
    count(): Parameter must be an array or an object that implements Countable
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=w3dslider
    • > Warning in wp-content/plugins/wp-w3d/includes/metabox/init.php+756
    count(): Parameter must be an array or an object that implements Countable

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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-w3d/public/views/ui-elements/grids/responsive3dgrid-samples.php
    • > /wp-content/plugins/wp-w3d/public/views/sliders/simpleparallaxslider-markup-html.php
    • > /wp-content/plugins/wp-w3d/public/views/sliders/3dboxslider-markup-html.php
  • 58× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/responsive3dgrid-samples.php on line 358
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/sliders/static-content/sample-content.php on line 15
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/responsive3dgrid-samples.php on line 81
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/responsive3dgrid-markup-html.php:4
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/responsive3dgrid-samples.php on line 25
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/static-content/sample-content.php on line 25
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/responsive3dgrid-samples.php on line 144
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/responsive3dgrid-samples.php on line 102
    • > PHP Warning
      Use of undefined constant W3D_ROOT_URL - assumed 'W3D_ROOT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-w3d/public/views/ui-elements/grids/static-content/sample-content.php on line 35
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wp-w3d/public/views/sliders/simpleparallaxslider-markup-html.php on line 17

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

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: w3d project, depth, slider, grid, parallax...

wp-w3d/wp-w3d.php 85% from 13 tests

The entry point to "WP W3D plugin" version 0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • 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
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin11,596 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
CSS95537343,720
PHP257221,3752,795
JavaScript151,1393512,781
Sass620902,136
Markdown1350146
HTML13518

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity40.44
▷ Minimum class complexity2.00
▷ Maximum class complexity177.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods146
▷ Static methods10370.55%
▷ Public methods13290.41%
▷ Protected methods00.00%
▷ Private methods149.59%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
41 PNG files occupy 1.61MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/sample/simple-parallax/3.png82.47KB27.57KB▼ 66.57%
includes/metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
public/assets/img/sample/mouse-parallax/slide2-layer3.png16.17KB7.86KB▼ 51.42%
includes/metabox/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
public/assets/img/sample/simple-parallax/default.png23.97KB7.75KB▼ 67.68%