62% cbach-wp-gridster

Code Review | Gridster

WordPress plugin Gridster scored62%from 54 tests.

About plugin

  • Plugin page: cbach-wp-gridster
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 6.3.1
  • First release: Apr 2, 2013
  • Latest release: Apr 22, 2013
  • Number of updates: 8
  • Update frequency: every 2.5 days
  • Top authors: carstenbach (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

50+ active /22,367 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.74ms] Passed 4 tests

An overview of server-side resources used by Gridster
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3140.39 ▼2.62
Dashboard /wp-admin3.64 ▲0.3350.38 ▼9.81
Posts /wp-admin/edit.php3.75 ▲0.3954.12 ▲2.76
Add New Post /wp-admin/post-new.php5.15 ▼0.7461.18 ▼29.30
Media Library /wp-admin/upload.php3.56 ▲0.3340.45 ▲3.11
Gridster /wp-admin/options-general.php?page=gridster_default_options3.5031.88
Add New /wp-admin/post-new.php?post_type=gridster3.6148.56

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, 7 new options
New WordPress options
gridster_default_options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Gridster: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.22 ▼1.071.91 ▼0.0540.90 ▼7.00
Dashboard /wp-admin2,235 ▲474.87 ▼0.99111.65 ▼0.7344.81 ▼0.65
Posts /wp-admin/edit.php2,118 ▲292.06 ▲0.0539.78 ▲3.8036.16 ▼2.27
Add New Post /wp-admin/post-new.php1,539 ▲322.92 ▼0.18663.29 ▼41.8763.12 ▲6.49
Media Library /wp-admin/upload.php1,417 ▲294.20 ▲0.00105.89 ▼13.4744.36 ▼7.96
Gridster /wp-admin/options-general.php?page=gridster_default_options8652.0326.6327.91
Add New /wp-admin/post-new.php?post_type=gridster1,6113.1971.4369.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/cbach-wp-gridster/cbach-wp-gridster.php+275
    Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • gridster_default_options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=gridster_default_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=gridster_default_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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 fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/cbach-wp-gridster/views/gridster-default.php:1
    • > PHP Notice
      Undefined variable: mce_locale in wp-content/plugins/cbach-wp-gridster/tinymce/i18n/mce_locale.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/cbach-wp-gridster/tinymce/i18n/mce_locale.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cbach-wp-gridster/cbach-wp-gridster.php:206

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=gridster
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1 1:28609 "jQuery.Deferred exception: j(...).live is not a function" "TypeError: j(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/cbach-wp-gridster/js/gridster_admin.min.js?ver=1.4:1:4106)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=gridster
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1 1:28609 "jQuery.Deferred exception: c.fn.LoadWidgetsOnStart is not a function" "TypeError: c.fn.LoadWidgetsOnStart is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/cbach-wp-gridster/js/gridster_admin.min.js?ver=1.4:1:9916)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=gridster
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1 1:28721 Uncaught TypeError: j(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=gridster
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-droppable,jquery-ui-resizable&ver=6.3.1 1:28721 Uncaught TypeError: c.fn.LoadWidgetsOnStart is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

cbach-wp-gridster/cbach-wp-gridster.php 92% from 13 tests

The main PHP file in "Gridster" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 228 characters long)

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 detected19,881 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript264,3505,28216,530
PHP47541,1461,789
CSS12951141,352
PO File17788210

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity118.00
▷ Minimum class complexity107.00
▷ Maximum class complexity129.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods116
▷ Static methods32.59%
▷ Public methods10993.97%
▷ Protected methods10.86%
▷ Private methods65.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants1593.75%
▷ Class constants16.25%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/chosen/chosen-sprite.png0.63KB0.88KB0.00%
images/jquery-ui-base/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
images/jquery-ui-base/ui-bg_diagonals-thick_18_b81900_40x40.png0.41KB0.15KB▼ 62.44%
images/jquery-ui-base/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
images/jquery-ui-base/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%