10% calendar-event

Code Review | Event Calendar - Calendar

WordPress plugin Event Calendar - Calendar scored10%from 54 tests.

About plugin

  • Plugin page: calendar-event
  • Plugin version: 1.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 19, 2016
  • Latest release: Oct 16, 2023
  • Number of updates: 163
  • Update frequency: every 16.4 days
  • Top authors: totalsoft (100%)

Code review

54 tests

User reviews

101 reviews

Install metrics

2,000+ active /142,953 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲1.16MB] [CPU: ▼0.75ms] Passed 4 tests

Server-side resources used by Event Calendar - Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.58 ▲1.1146.25 ▲0.85
Dashboard /wp-admin4.55 ▲1.2156.11 ▼10.95
Posts /wp-admin/edit.php4.55 ▲1.2056.37 ▼0.97
Add New Post /wp-admin/post-new.php6.99 ▲1.11100.06 ▲16.01
Media Library /wp-admin/upload.php4.55 ▲1.3343.19 ▲8.06
Total Products /wp-admin/admin.php?page=Total_Soft_Products4.5539.40
Calendar Manager /wp-admin/admin.php?page=Total_Soft_Cal5.9253.24
Event Manager /wp-admin/admin.php?page=Total_Soft_Events4.6053.75

Server storage [IO: ▲3.94MB] [DB: ▲0.03MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 217 new files
Database: 10 new tables, 7 new options
New tables
wp_totalsoft_cal_2
wp_totalsoft_cal_4
wp_totalsoft_cal_events_p2
wp_totalsoft_cal_part
wp_totalsoft_cal_1
wp_totalsoft_cal_events_p3
wp_totalsoft_cal_ids
wp_totalsoft_cal_events
wp_totalsoft_cal_types
wp_totalsoft_cal_3
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_total_soft_cal
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Event Calendar - Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.53 ▼1.007.69 ▲6.0036.91 ▼7.02
Dashboard /wp-admin2,217 ▲505.68 ▲0.08100.53 ▼16.4475.63 ▲33.81
Posts /wp-admin/edit.php2,135 ▲322.00 ▼0.0138.13 ▼3.4732.92 ▼4.44
Add New Post /wp-admin/post-new.php1,555 ▲2922.93 ▼0.16603.56 ▼85.18163.46 ▲113.57
Media Library /wp-admin/upload.php1,429 ▲294.19 ▲0.0198.26 ▼8.5582.65 ▲35.33
Total Products /wp-admin/admin.php?page=Total_Soft_Products9631.9925.4926.39
Calendar Manager /wp-admin/admin.php?page=Total_Soft_Cal13,2172.0840.0563.52
Event Manager /wp-admin/admin.php?page=Total_Soft_Events1,5274.3757.77107.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 10 tables in the database
    • wp_totalsoft_cal_part
    • wp_totalsoft_cal_3
    • wp_totalsoft_cal_2
    • wp_totalsoft_cal_types
    • wp_totalsoft_cal_1
    • wp_totalsoft_cal_events
    • wp_totalsoft_cal_ids
    • wp_totalsoft_cal_4
    • wp_totalsoft_cal_events_p3
    • wp_totalsoft_cal_events_p2
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_total_soft_cal
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Total_Soft_Cal
    • > Notice in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-New.php+717
    Undefined offset: 10
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Total_Soft_Cal
    • > Notice in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-New.php+717
    Trying to get property 'id' of non-object

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 fix the following items
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/calendar-event/Includes/Total-Soft-Products.php:2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Data.php on line 3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Data.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Install.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Events.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-New.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Data.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/calendar-event/Includes/Total-Soft-Calendar-Data.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: calendar, events, wp calendar, responsive calendar, event calendar...

calendar-event/index.php 92% from 13 tests

Analyzing the main PHP file in "Event Calendar - Calendar" version 1.5.6
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("calendar-event.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected19,632 lines of code in 122 files:
LanguageFilesBlank linesComment linesLines of code
PHP8344958,654
PO File432,07905,064
CSS14103582,995
JavaScript541551372,040
SVG300879

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity398.00
▷ Minimum class complexity398.00
▷ Maximum class complexity398.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
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
12 PNG files occupy 0.43MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/Products/Event_Calendar.png31.90KB31.51KB▼ 1.22%
Images/TotalSoftLogo.png63.00KB12.48KB▼ 80.18%
Images/Products/Poll.png126.72KB38.19KB▼ 69.87%
Images/Products/Portfolio.png49.84KB48.98KB▼ 1.73%
Images/Pricing-icon.png8.76KB3.07KB▼ 64.94%