78% profpanda-custom-dashboard-widget

Code Review | ProfPanda Custom Dashboard Widget

WordPress plugin ProfPanda Custom Dashboard Widget scored78%from 54 tests.

About plugin

  • Plugin page: profpanda-custom-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2017
  • Latest release: Apr 2, 2019
  • Number of updates: 3
  • Update frequency: every 265.0 days
  • Top authors: profpanda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /622 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.77ms] Passed 4 tests

Server-side resources used by ProfPanda Custom Dashboard Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.75 ▼5.33
Dashboard /wp-admin3.06 ▼0.2425.17 ▼21.63
Posts /wp-admin/edit.php3.37 ▲0.0141.70 ▼11.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.78 ▼4.86
Media Library /wp-admin/upload.php3.24 ▲0.0131.84 ▼0.68
ProfPanda Custom Dashboard Widget /wp-admin/options-general.php?page=pcdw3.1930.38

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ProfPanda Custom Dashboard Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.34 ▼1.024.15 ▲2.3740.30 ▼2.38
Dashboard /wp-admin2,258 ▲675.84 ▲0.96101.23 ▼10.5342.91 ▲1.79
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0137.37 ▼3.2936.25 ▼0.67
Add New Post /wp-admin/post-new.php1,545 ▲3117.86 ▲0.06611.32 ▼12.5954.04 ▲8.01
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0695.00 ▼2.4039.22 ▼5.01
ProfPanda Custom Dashboard Widget /wp-admin/options-general.php?page=pcdw8702.1924.4330.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pcdw
    • > Notice in wp-content/plugins/profpanda-custom-dashboard-widget/profpanda_custom_dashboard_widget.php+176
    Trying to access array offset on value of type bool

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/profpanda-custom-dashboard-widget/profpanda_custom_dashboard_widget.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: widget, dashboard, custom html

profpanda-custom-dashboard-widget/profpanda_custom_dashboard_widget.php 85% from 13 tests

This is the main PHP file of "ProfPanda Custom Dashboard Widget" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("profpanda-custom-dashboard-widget.php" instead of "profpanda_custom_dashboard_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin347 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24673238
PO File1171760
CSS17035
JavaScript14014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected