78% connect-daily-web-calendar

Code Review | WordPress Events Calendar Plugin - connectDaily

WordPress plugin WordPress Events Calendar Plugin - connectDaily scored78%from 54 tests.

About plugin

  • Plugin page: connect-daily-web...
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2015
  • Latest release: Feb 13, 2023
  • Number of updates: 198
  • Update frequency: every 13.5 days
  • Top authors: gsexton (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

200+ active /26,739 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: ▲1.29MB] [CPU: ▲2.71ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Events Calendar Plugin - connectDaily
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.78 ▲1.3152.50 ▲8.05
Dashboard /wp-admin4.63 ▲1.3258.16 ▼6.20
Posts /wp-admin/edit.php4.69 ▲1.3360.45 ▲10.94
Add New Post /wp-admin/post-new.php7.17 ▲1.28104.08 ▼1.95
Media Library /wp-admin/upload.php4.49 ▲1.2649.91 ▲13.87
Support /wp-admin/admin.php?page=cdaily-settings-support4.4841.75
Settings 1 /wp-admin/admin.php?page=cdaily-settings4.4845.54
Overview 1 /wp-admin/admin.php?page=cdaily-menu4.4740.51

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 69 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
cdaily_settings
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WordPress Events Calendar Plugin - connectDaily: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,257 ▲47114.09 ▼0.2814.55 ▲12.8042.05 ▼1.33
Dashboard /wp-admin2,552 ▲3715.84 ▲0.1292.31 ▼5.8644.68 ▲4.24
Posts /wp-admin/edit.php2,311 ▲2112.43 ▲0.4238.44 ▼2.5035.65 ▼4.83
Add New Post /wp-admin/post-new.php1,601 ▲6623.77 ▲5.78685.74 ▲64.7938.92 ▼31.64
Media Library /wp-admin/upload.php1,761 ▲3614.49 ▲0.30103.25 ▼7.6143.94 ▼3.65
Support /wp-admin/admin.php?page=cdaily-settings-support1,1201.9725.9830.35
Settings 1 /wp-admin/admin.php?page=cdaily-settings1,5702.1228.5534.60
Overview 1 /wp-admin/admin.php?page=cdaily-menu1,3542.0129.0431.17

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • cdaily_settings
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyBaseRenderer' not found in wp-content/plugins/connect-daily-web-calendar/display-calendar.php:22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/connect-daily-web-calendar/support.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-icalendar-widget.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyBaseRenderer' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-eventsrenderer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyBaseRenderer' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-eventsrenderer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyPlugin' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-wordpress-plugin.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyBaseRenderer' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-eventsrenderer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyPlugin' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-wordpress-plugin.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyBaseRenderer' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-eventsrenderer.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'CDailyBaseRenderer' not found in wp-content/plugins/connect-daily-web-calendar/class-cdaily-eventsrenderer.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cdaily-menu
    • > Network (severe)
    wp-admin/admin-ajax.php?action=cdaily&subaction=cd_admintypedata&ver=1.4.7 - Failed to load resource: the server responded with a status of 400 (Bad Request)
    • > GET request to /wp-admin/admin.php?page=cdaily-settings-support
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cdaily-settings-support - Refused to execute script from '/wp-admin/admin-ajax.php?action=cdaily&subaction=cd_admintypedata&ver=1.4.7' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cdaily-settings
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cdaily-settings - Refused to execute script from '/wp-admin/admin-ajax.php?action=cdaily&subaction=cd_admintypedata&ver=1.4.7' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=cdaily-menu
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=cdaily-menu - Refused to execute script from '/wp-admin/admin-ajax.php?action=cdaily&subaction=cd_admintypedata&ver=1.4.7' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 90% 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 require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

connect-daily-web-calendar/cdaily.php 85% from 13 tests

The main PHP file in "WordPress Events Calendar Plugin - connectDaily" ver. 1.4.6 adds more information about the plugin and also serves as the entry point for this plugin
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 ("connect-daily-web-calendar.php" instead of "cdaily.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 215 characters long)

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
No dangerous file extensions were detected9,858 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP277272,1605,869
PO File48001,4521,612
JavaScript41273911,326
CSS35035477
HTML580362
SVG515180
Bourne Shell202928
JSON4004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity31.04
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods302
▷ Static methods144.64%
▷ Public methods24480.79%
▷ Protected methods92.98%
▷ Private methods4916.23%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants31
▷ Global constants00.00%
▷ Class constants31100.00%
▷ Public constants31100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.34MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/WPPluginTutorial_N.png171.98KB63.46KB▼ 63.10%
tick_16.png0.51KB0.44KB▼ 15.05%
images/WPPluginTutorial_H.png172.30KB62.66KB▼ 63.63%
images/search.png0.31KB0.26KB▼ 15.58%