89% wc-dashboard-widget

Code Review | WordCamp Dashboard Widget

WordPress plugin WordCamp Dashboard Widget scored 89% from 54 tests.

About plugin

  • Plugin page: wc-dashboard-widget
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2016
  • Latest release: Feb 3, 2017
  • Number of updates: 19
  • Update frequency: every 9.0 days
  • Top authors: AjitBohra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.73ms] Passed 4 tests

An overview of server-side resources used by WordCamp Dashboard Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.25 ▼4.67
Dashboard /wp-admin3.43 ▲0.12648.76 ▲595.69
Posts /wp-admin/edit.php3.40 ▲0.0446.70 ▲3.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.68 ▼6.31
Media Library /wp-admin/upload.php3.27 ▲0.0437.13 ▲4.32

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WordCamp Dashboard Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.44 ▼0.961.71 ▼0.3341.13 ▼1.74
Dashboard /wp-admin2,262 ▲745.28 ▲0.40102.23 ▼18.5540.08 ▼4.88
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0634.06 ▼2.7635.93 ▲2.81
Add New Post /wp-admin/post-new.php1,533 ▲923.30 ▼0.05664.71 ▼16.4263.14 ▲8.56
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0096.01 ▼0.4642.66 ▼3.98

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wc-dashboard-widget === )
The official readme.txt is a good inspiration

wc-dashboard-widget/wordcamp-dashboard-widget.php 85% from 13 tests

The entry point to "WordCamp Dashboard Widget" version 0.6 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-dashboard-widget.php" instead of "wordcamp-dashboard-widget.php")

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
No dangerous file extensions were detected537 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP13998207
JavaScript215171
Markdown343093
CSS212066

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/asterisk_yellow.png0.73KB0.85KB0.00%
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%