10% wp-gcalendar

Code Review | WP Google Calendar Manager - Google Calendar Plugin

WordPress plugin WP Google Calendar Manager - Google Calendar Plugin scored10%from 54 tests.

About plugin

  • Plugin page: wp-gcalendar
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9
  • WordPress version: 6.3.1
  • First release: Jan 14, 2016
  • Latest release: Mar 6, 2018
  • Number of updates: 60
  • Update frequency: every 13.1 days
  • Top authors: EuroCizia (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

900+ active /29,776 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-gcalendar/admin/partials/widgets.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; WPGCWidget has a deprecated constructor

Server metrics [RAM: ▼1.76MB] [CPU: ▼52.58ms] Passed 4 tests

An overview of server-side resources used by WP Google Calendar Manager - Google Calendar Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.23 ▼1.246.69 ▼33.32
Dashboard /wp-admin2.25 ▼1.066.16 ▼41.55
Posts /wp-admin/edit.php2.25 ▼1.117.17 ▼41.68
Add New Post /wp-admin/post-new.php2.25 ▼3.648.75 ▼93.75
Media Library /wp-admin/upload.php2.25 ▼0.985.84 ▼28.30
All Events /wp-admin/admin.php?page=google-calendar-plg2.256.88
Documentation /wp-admin/admin.php?page=wpgc-documentation2.258.62
Settings /wp-admin/admin.php?page=google-calendar-settings2.258.12

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 78 new files
Database: 2 new tables, 9 new options
New tables
wp_events
wp_api_setting
New WordPress options
widget_recent-posts
events_database_version
widget_wpgc_widget
widget_theysaidso_widget
api_setting_database_version
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Google Calendar Manager - Google Calendar Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲23515.72 ▲0.9618.65 ▲16.9342.47 ▼3.30
Dashboard /wp-admin2,249 ▲616.08 ▲1.20111.13 ▼1.0973.98 ▲28.06
Posts /wp-admin/edit.php2,150 ▲582.83 ▲0.8343.29 ▼0.2833.96 ▼3.39
Add New Post /wp-admin/post-new.php1,560 ▲4623.74 ▲6.17682.91 ▲64.1237.28 ▼10.98
Media Library /wp-admin/upload.php1,434 ▲435.31 ▲1.11114.23 ▲15.1985.37 ▲42.68
All Events /wp-admin/admin.php?page=google-calendar-plg7132.1116.9820.68
Documentation /wp-admin/admin.php?page=wpgc-documentation1,5399.81264.70112.13
Settings /wp-admin/admin.php?page=google-calendar-settings9962.4032.1527.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-gcalendar/admin/partials/widgets.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; WPGCWidget has a deprecated constructor
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_api_setting
    • wp_events
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • events_database_version
    • widget_wpgc_widget
    • widget_recent-comments
    • api_setting_database_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=google-calendar-settings
    • > Deprecated in wp-content/plugins/wp-gcalendar/admin/partials/widgets.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; WPGCWidget has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=google-calendar-settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WPGCWidget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-gcalendar/admin/partials/ajax-callback.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-gcalendar/admin/partials/shortcodes.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-gcalendar/admin/partials/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-gcalendar/admin/partials/wp-gcalendar-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-gcalendar/admin/partials/trans.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-gcalendar/admin/partials/widgets.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: google calendar, calendar, wp google calendar, calnedar events, google calendar event manager...

wp-gcalendar/wp-gcalendar.php Passed 13 tests

This is the main PHP file of "WP Google Calendar Manager - Google Calendar Plugin" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
Wordpress plugin to manage your google calendar events.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin4,342 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript74054131,672
CSS103272091,359
PHP201865201,017
PO File2130130294

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.83MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/1.png27.88KB13.15KB▼ 52.82%
admin/img/7.png104.98KB37.76KB▼ 64.03%
admin/img/18.png36.22KB12.91KB▼ 64.35%
admin/img/3.png50.04KB21.09KB▼ 57.86%
admin/img/calendar.png3.23KB0.84KB▼ 74.01%