89% wedgets-on-dashboard

Code Review | Widgets on dashboard

WordPress plugin Widgets on dashboard scored89%from 54 tests.

About plugin

  • Plugin page: wedgets-on-dashboard
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.9
  • WordPress version: 6.3.1
  • First release: May 7, 2014
  • Latest release: May 7, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tmatsuur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,621 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
Installer ran successfully

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

An overview of server-side resources used by Widgets on dashboard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.60 ▲6.64
Dashboard /wp-admin3.04 ▼0.2626.93 ▼23.99
Posts /wp-admin/edit.php3.37 ▲0.0250.14 ▼0.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.37 ▼19.43
Media Library /wp-admin/upload.php3.25 ▲0.0236.88 ▲2.11

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Widgets on dashboard: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,164 ▲40314.66 ▲0.172.35 ▲0.6443.20 ▲0.52
Dashboard /wp-admin2,548 ▲3685.74 ▲0.0893.94 ▲6.9944.20 ▼0.67
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0036.31 ▼4.3133.32 ▼3.11
Add New Post /wp-admin/post-new.php1,526 ▼1123.07 ▲4.77679.34 ▲53.2655.33 ▼30.53
Media Library /wp-admin/upload.php1,394 ▼04.17 ▼0.0197.99 ▼4.3742.49 ▲0.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Some sidebar widgets displayed on dashboard page.), #2 (Sidebar widgets displayed by a screen option can be chosen.)
You can look at the official readme.txt

wedgets-on-dashboard/widgets-on-dashboard.php 92% from 13 tests

This is the main PHP file of "Widgets on dashboard" version 0.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wedgets-on-dashboard.php" instead of "widgets-on-dashboard.php")

Code Analysis Passed 3 tests

File types Passed 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
There were no executable files found in this plugin78 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151278

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity2.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png7.61KB6.89KB▼ 9.37%
screenshot-2.png6.76KB6.34KB▼ 6.10%