79% grid-element-trash

Code Review | Grid Element Trash

WordPress plugin Grid Element Trash scored79%from 54 tests.

About plugin

  • Plugin page: grid-element-trash
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Jul 24, 2015
  • Latest release: Jan 5, 2022
  • Number of updates: 11
  • Update frequency: every 214.5 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,338 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.37ms] Passed 4 tests

Analyzing server-side resources used by Grid Element Trash
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0635.70 ▲0.48
Dashboard /wp-admin3.36 ▲0.0552.53 ▲3.30
Posts /wp-admin/edit.php3.48 ▲0.1145.31 ▲1.57
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.75 ▼3.39
Media Library /wp-admin/upload.php3.29 ▲0.0534.12 ▼0.14
Trash /wp-admin/admin.php?page=settings-grid-element-trash3.2529.49

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

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

Browser metrics Passed 4 tests

Grid Element Trash: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▼0.031.73 ▲0.2037.25 ▲1.26
Dashboard /wp-admin2,195 ▲145.58 ▼0.1182.80 ▼17.8841.35 ▼0.99
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0335.90 ▲0.6433.52 ▼2.56
Add New Post /wp-admin/post-new.php1,529 ▲323.56 ▲0.03610.45 ▼47.9644.27 ▼12.95
Media Library /wp-admin/upload.php1,400 ▼34.21 ▲0.0394.65 ▲0.3040.68 ▲0.17
Trash /wp-admin/admin.php?page=settings-grid-element-trash7571.9924.3824.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/grid-element-trash/partials/settings-page-display.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'GridElementTrash\\Store' not found in wp-content/plugins/grid-element-trash/public-functions.php:9
    • > PHP Notice
      Undefined variable: containers in wp-content/plugins/grid-element-trash/partials/settings-page-display.php on line 23
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/grid-element-trash/partials/settings-page-display.php on line 56
    • > PHP Notice
      Undefined variable: reuseContainers in wp-content/plugins/grid-element-trash/partials/settings-page-display.php on line 40
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/grid-element-trash/partials/settings-page-display.php on line 23
    • > PHP Notice
      Undefined variable: meta_boxes in wp-content/plugins/grid-element-trash/partials/settings-page-display.php on line 56
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/grid-element-trash/partials/settings-page-display.php on line 40

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: extension, grid, trash

grid-element-trash/grid-element-trash.php Passed 13 tests

Analyzing the main PHP file in "Grid Element Trash" version 1.1.2
50 characters long description:
Extends Grid with a trash for containers and boxes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected301 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP869111277
JavaScript12018
Markdown1103
Sass1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin