84% important-dates-dashboard-widget

Code Review | Important Dates Dashboard Widget

WordPress plugin Important Dates Dashboard Widget scored84%from 54 tests.

About plugin

  • Plugin page: important-dates-d...
  • Plugin version: 1.02
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 3, 2022
  • Latest release: Feb 20, 2022
  • Number of updates: 6
  • Update frequency: every 2.8 days
  • Top authors: virtualmarketadvantage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,286 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: ▲3.60MB] [CPU: ▲26.38ms] Passed 4 tests

Analyzing server-side resources used by Important Dates Dashboard Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.87 ▲3.4163.21 ▲19.07
Dashboard /wp-admin6.95 ▲3.6569.64 ▲21.00
Posts /wp-admin/edit.php6.99 ▲3.6376.84 ▲32.42
Add New Post /wp-admin/post-new.php9.70 ▲3.82130.53 ▲33.04
Media Library /wp-admin/upload.php6.95 ▲3.7268.57 ▲35.44
Add New /wp-admin/post-new.php?post_type=acf-field-group7.0573.40
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools6.9356.16
Field Groups /wp-admin/edit.php?post_type=acf-field-group6.9357.10

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 261 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
acf_version
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Important Dates Dashboard Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15313.64 ▼0.731.95 ▲0.2046.92 ▲2.35
Dashboard /wp-admin2,280 ▲924.96 ▲0.07100.17 ▼20.4241.10 ▼9.04
Posts /wp-admin/edit.php2,122 ▲332.00 ▼0.0438.22 ▲1.3434.07 ▼5.43
Add New Post /wp-admin/post-new.php6,691 ▲5,16324.14 ▲6.131,002.89 ▲393.6441.14 ▼21.41
Media Library /wp-admin/upload.php1,970 ▲5888.29 ▲4.09224.21 ▲125.9452.05 ▲9.05
Add New /wp-admin/post-new.php?post_type=acf-field-group2,3504.0180.1379.28
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools1,1742.9241.6553.39
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,2172.1132.8732.46

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • acf_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 77× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_number' not found in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/fields/class-acf-field-range.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/fields/class-acf-field-date_picker.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/fields/class-acf-field-accordion.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/admin/views/html-admin-page-upgrade-network.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/fields/class-acf-field-text.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/admin/views/html-location-rule.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/acf-helper-functions.php:142
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_idify() in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/admin/views/field-group-field.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/admin/views/field-group-field.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/important-dates-dashboard-widget/includes/acf/includes/fields/class-acf-field-email.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: "vma.agency"
You can look at the official readme.txt

important-dates-dashboard-widget/important_dates_dashboard_widget.php 92% from 13 tests

The main file in "Important Dates Dashboard Widget" v. 1.02 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("important-dates-dashboard-widget.php" instead of "important_dates_dashboard_widget.php")

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
Everything looks great! No dangerous files found in this plugin112,401 lines of code in 202 files:
LanguageFilesBlank linesComment linesLines of code
PO File3123,80540,55148,965
JavaScript175,8835,98938,456
PHP1388,54018,25218,896
CSS154957396,078
SVG1006

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.72
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes102
▷ Abstract classes21.96%
▷ Concrete classes10098.04%
▷ Final classes00.00%
Methods746
▷ Static methods10.13%
▷ Public methods72797.45%
▷ Protected methods00.00%
▷ Private methods192.55%
Functions452
▷ Named functions44899.12%
▷ Anonymous functions40.88%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.47MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png66.77KB24.82KB▼ 62.83%
includes/acf/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%
includes/acf/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
assets/icon-256x256.png39.89KB12.73KB▼ 68.08%
assets/banner-772x250.png56.47KB18.91KB▼ 66.51%