79% dans-gcal

Code Review | Dan's Embedder for Google Calendar

WordPress plugin Dan's Embedder for Google Calendar scored79%from 54 tests.

About plugin

  • Plugin page: dans-gcal
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2016
  • Latest release: Oct 10, 2023
  • Number of updates: 6
  • Update frequency: every 423.5 days
  • Top authors: duplaja (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /15,117 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.03MB] [CPU: ▼10.64ms] Passed 4 tests

Analyzing server-side resources used by Dan's Embedder for Google Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.25 ▼4.13
Dashboard /wp-admin3.34 ▲0.0444.51 ▼5.73
Posts /wp-admin/edit.php3.39 ▲0.0348.68 ▲1.42
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.08 ▼29.47
Media Library /wp-admin/upload.php3.26 ▲0.0333.57 ▼3.24
Dan's gCal /wp-admin/tools.php?page=dans-gcal-settings3.2232.08

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 100 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Dan's Embedder for Google Calendar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲22614.24 ▼0.3619.94 ▲18.1435.93 ▼9.74
Dashboard /wp-admin2,199 ▲285.64 ▲0.1090.15 ▼9.7840.03 ▼5.61
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0440.06 ▲3.7935.00 ▲2.90
Add New Post /wp-admin/post-new.php1,536 ▲723.23 ▲0.42663.94 ▼12.7356.73 ▼2.03
Media Library /wp-admin/upload.php1,401 ▲14.16 ▲0.0696.64 ▼13.6539.83 ▼7.67
Dan's gCal /wp-admin/tools.php?page=dans-gcal-settings8871.9925.5831.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=dans-gcal-settings
    • > Warning in wp-content/plugins/dans-gcal/dans-gcal.php+131
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/tools.php?page=dans-gcal-settings
    • > Notice in wp-content/plugins/dans-gcal/dans-gcal.php+143
    Trying to access array offset on value of type bool

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dans-gcal/dans-gcal.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: embed, calendar, google calendar, gcal, dan

dans-gcal/dans-gcal.php Passed 13 tests

The entry point to "Dan's Embedder for Google Calendar" version 1.3.1 is a PHP file that has certain tags in its header comment area
52 characters long description:
A custom Google Calendar embed w/ list and full view

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin10,099 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript653,1361,8978,841
CSS63212201,025
PHP211936233

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions7
▷ Named functions7100.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/fullcalendar/lib/cupertino/images/ui-bg_glass_50_3baae3_1x400.png0.33KB0.16KB▼ 50.89%
js/fullcalendar/lib/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.24KB0.16KB▼ 35.34%
js/fullcalendar/lib/cupertino/images/ui-icons_72a7cf_256x240.png4.44KB4.17KB▼ 6.02%
js/fullcalendar/lib/cupertino/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
js/fullcalendar/lib/cupertino/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%