74% google-calendar-events

Code Review | Simple Calendar - Google Calendar Plugin

WordPress plugin Simple Calendar - Google Calendar Plugin scored74%from 54 tests.

About plugin

Code review

54 tests

User reviews

363 reviews

Install metrics

60,000+ active /2,613,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.41MB] [CPU: ▲12.24ms] Passed 4 tests

An overview of server-side resources used by Simple Calendar - Google Calendar Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.23 ▲2.7659.42 ▲21.88
Dashboard /wp-admin4.70 ▲1.3561.61 ▲1.24
Posts /wp-admin/edit.php4.82 ▲1.4659.17 ▲13.47
Add New Post /wp-admin/post-new.php7.31 ▲1.42108.29 ▲12.83
Media Library /wp-admin/upload.php4.62 ▲1.3962.83 ▲21.41

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,605 new files
Database: no new tables, 9 new options
New WordPress options
widget_gce_widget
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
simple-calendar_version
widget_recent-posts
simple-calendar_admin_notices

Browser metrics Passed 4 tests

Simple Calendar - Google Calendar Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,885 ▼87611.07 ▼3.5011.95 ▲10.2735.37 ▼4.71
Dashboard /wp-admin2,248 ▲715.55 ▼0.0189.39 ▲2.7757.60 ▲20.37
Posts /wp-admin/edit.php2,162 ▲622.03 ▲0.0938.06 ▲4.2130.22 ▼8.47
Add New Post /wp-admin/post-new.php1,560 ▲3423.76 ▲0.83664.65 ▼23.4236.39 ▼19.18
Media Library /wp-admin/upload.php1,459 ▲564.29 ▲0.08131.91 ▲33.4548.53 ▲5.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_gce_widget
    • widget_theysaidso_widget
    • simple-calendar_admin_notices
    • db_upgraded
    • simple-calendar_version
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 440× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleCalendar\\plugin_deps\\Carbon\\Exceptions\\RuntimeException' not found in wp-content/plugins/google-calendar-events/third-party/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCalendar\\plugin_deps\\GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/google-calendar-events/third-party/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCalendar\\plugin_deps\\Symfony\\Component\\Translation\\Exception\\RuntimeException' not found in wp-content/plugins/google-calendar-events/third-party/symfony/translation/Exception/ProviderException.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleCalendar\\plugin_deps\\Symfony\\Component\\Translation\\Provider\\ProviderFactoryInterface' not found in wp-content/plugins/google-calendar-events/third-party/symfony/translation/Provider/AbstractProviderFactory.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCalendar\\plugin_deps\\Google\\Model' not found in wp-content/plugins/google-calendar-events/third-party/google/apiclient-services/src/Calendar/Setting.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCalendar\\plugin_deps\\Monolog\\Handler\\AbstractSyslogHandler' not found in wp-content/plugins/google-calendar-events/third-party/monolog/monolog/src/Monolog/Handler/SyslogHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCalendar\\plugin_deps\\Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/google-calendar-events/third-party/monolog/monolog/src/Monolog/Handler/SamplingHandler.php:32
    • > PHP Warning
      require_once(wp-content/plugins/google-calendar-events/third-party/nesbot/carbon/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/google-calendar-events/third-party/nesbot/carbon/sponsors.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCalendar\\plugin_deps\\Google\\Model' not found in wp-content/plugins/google-calendar-events/third-party/google/apiclient-services/src/Drive/User.php:20
    • > PHP Fatal error
      Uncaught ReflectionException: Class SimpleCalendar\\plugin_deps\\Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface does not exist in wp-content/plugins/google-calendar-events/third-party/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: event calendar, google, events, calendar, calendars...

google-calendar-events/google-calendar-events.php Passed 13 tests

The main file in "Simple Calendar - Google Calendar Plugin" v. 3.2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
108 characters long description:
Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/google-calendar-events/third-party/nesbot/carbon/bin/carbon.bat
74,949 lines of code in 1,368 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,3384,71256,99362,212
JavaScript111,8169677,170
XSD392482,803
CSS124632661,803
PO File1379455783
JSON100141
SVG10033
DOS Batch1004

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity12.17
▷ Minimum class complexity1.00
▷ Maximum class complexity351.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces84
Interfaces78
Traits39
Classes581
▷ Abstract classes284.82%
▷ Concrete classes55395.18%
▷ Final classes5710.31%
Methods5,443
▷ Static methods64211.79%
▷ Public methods4,57083.96%
▷ Protected methods4047.42%
▷ Private methods4698.62%
Functions530
▷ Named functions15328.87%
▷ Anonymous functions37771.13%
Constants376
▷ Global constants123.19%
▷ Class constants36496.81%
▷ Public constants31586.54%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 PNG files occupy 0.79MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/pages/settings/green-tick.png0.52KB0.33KB▼ 36.07%
assets/images/pages/settings/rating.png2.59KB1.89KB▼ 27.21%
assets/images/pages/welcome/cof-house.png32.17KB12.50KB▼ 61.14%
assets/images/pages/settings/black-tick.png0.41KB0.41KB0.00%
assets/images/pages/welcome/banner-right.png154.92KB66.45KB▼ 57.11%