62% dashboard-organizer

Code Review | Dashboard Organizer

WordPress plugin Dashboard Organizer scored62%from 54 tests.

About plugin

  • Plugin page: dashboard-organizer
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 2, 2022
  • Latest release: Dec 3, 2022
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: mwguerra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /579 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.77MB] [CPU: ▼34.40ms] Passed 4 tests

Analyzing server-side resources used by Dashboard Organizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1337.56 ▼6.49
Dashboard /wp-admin3.18 ▼0.1324.07 ▼26.39
Posts /wp-admin/edit.php3.18 ▼0.1828.81 ▼18.51
Add New Post /wp-admin/post-new.php3.18 ▼2.7127.50 ▼83.50
Media Library /wp-admin/upload.php3.18 ▼0.0526.75 ▼9.20
Dashboard Organizer /wp-admin/options-general.php?page=mwgdo_options3.1824.22

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Dashboard Organizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲11213.90 ▼0.851.74 ▼0.1431.89 ▼13.32
Dashboard /wp-admin2,242 ▲515.23 ▲0.28116.35 ▲9.9545.34 ▼1.48
Posts /wp-admin/edit.php2,125 ▲362.40 ▲0.3840.46 ▲1.7632.56 ▼3.47
Add New Post /wp-admin/post-new.php1,381 ▼15217.00 ▼4.31578.71 ▼116.8922.37 ▼33.33
Media Library /wp-admin/upload.php1,424 ▲394.66 ▲0.40100.88 ▲1.1137.73 ▼9.55
Dashboard Organizer /wp-admin/options-general.php?page=mwgdo_options9722.5140.9541.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=mwgdo_options
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
    • > GET request to /wp-admin/options-general.php?page=mwgdo_options
    • > Notice in wp-content/plugins/dashboard-organizer/app/Pages/ToggleButtonAdminMenu.php+88
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/dashboard-organizer/uninstall.php
    • > /wp-content/plugins/dashboard-organizer/app/Pages/SettingsView.php
    • > /wp-content/plugins/dashboard-organizer/dashboard-organizer.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function test() in wp-content/plugins/dashboard-organizer/tests/Unit/ExampleTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MWGuerra\\DashboardOrganizer\\BaseController' not found in wp-content/plugins/dashboard-organizer/app/Api/Routes.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MWGuerra\\DashboardOrganizer\\BaseController' not found in wp-content/plugins/dashboard-organizer/app/Actions/CreateSettingsLinks.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MWGuerra\\DashboardOrganizer\\BaseController' not found in wp-content/plugins/dashboard-organizer/app/Pages/ToggleButtonAdminMenu.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MWGuerra\\DashboardOrganizer\\BaseController' not found in wp-content/plugins/dashboard-organizer/app/Actions/Enqueue.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MWGuerra\\DashboardOrganizer\\BaseController' not found in wp-content/plugins/dashboard-organizer/app/Api/Settings.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MWGuerra\\DashboardOrganizer\\BaseController' not found in wp-content/plugins/dashboard-organizer/app/Pages/Settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function uses() in wp-content/plugins/dashboard-organizer/tests/Pest.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Tests\\Integration\\beforeEach() in wp-content/plugins/dashboard-organizer/tests/Integration/ExampleTest.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: menu, organizer, dashboard, show, hide

dashboard-organizer/dashboard-organizer.php 92% from 13 tests

The main PHP script in "Dashboard Organizer" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,650 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP27253513969
Vuejs Component34036265
JSON500168
TypeScript61510106
HTML12048
CSS36031
XML10031
JavaScript24023
Markdown1709

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.40
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods68
▷ Static methods2841.18%
▷ Public methods6392.65%
▷ Protected methods00.00%
▷ Private methods57.35%
Functions13
▷ Named functions215.38%
▷ Anonymous functions1184.62%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-436x436.png101.84KB25.32KB▼ 75.14%