78% gecko-google-calendar

Code Review | Gecko Google Calendar

WordPress plugin Gecko Google Calendar scored78%from 54 tests.

About plugin

  • Plugin page: gecko-google-cale...
  • Plugin version: 1.6.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8
  • WordPress version: 6.3.1
  • First release: Aug 15, 2017
  • Latest release: Aug 13, 2018
  • Number of updates: 33
  • Update frequency: every 11.1 days
  • Top authors: musicalbigfoot (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,281 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.47ms] Passed 4 tests

Server-side resources used by Gecko Google Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.34 ▼8.13
Dashboard /wp-admin3.34 ▲0.0445.27 ▼2.07
Posts /wp-admin/edit.php3.46 ▲0.1048.73 ▲4.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.65 ▲9.95
Media Library /wp-admin/upload.php3.27 ▲0.0435.80 ▲0.01

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 583 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Gecko Google Calendar: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲19614.82 ▲0.5238.00 ▲35.8439.57 ▼0.05
Dashboard /wp-admin2,229 ▲415.89 ▲0.00108.73 ▲5.5842.82 ▼3.62
Posts /wp-admin/edit.php2,109 ▲202.01 ▼0.0340.90 ▲4.4035.38 ▼2.31
Add New Post /wp-admin/post-new.php1,540 ▲2118.39 ▼5.00592.80 ▼84.4857.56 ▼6.96
Media Library /wp-admin/upload.php1,408 ▲264.19 ▲0.10101.69 ▼3.1243.54 ▲0.87

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gecko-google-calendar/admin/partials/active-calendars.php
    • > /wp-content/plugins/gecko-google-calendar/admin/partials/unavailable.php
  • 311× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/gecko-google-calendar/vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyGroup.php:18
    • > PHP Notice
      Undefined variable: isAuth in wp-content/plugins/gecko-google-calendar/admin/partials/header.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\Tests\\BaseTest' not found in wp-content/plugins/gecko-google-calendar/vendor/google/auth/tests/HttpHandler/HttpHandlerFactoryTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/gecko-google-calendar/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\Tests\\BaseTest' not found in wp-content/plugins/gecko-google-calendar/vendor/google/auth/tests/HttpHandler/Guzzle5HttpHandlerTest.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Rijndael' not found in wp-content/plugins/gecko-google-calendar/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php:59
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/gecko-google-calendar/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Resource' not found in wp-content/plugins/gecko-google-calendar/vendor/google/apiclient-services/src/Google/Service/Oauth2/Resource/Userinfo.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gecko-google-calendar/vendor/monolog/monolog/tests/Monolog/LoggerTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/gecko-google-calendar/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
3 plugin tags: calendar, google-calendar, skeleton

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

"Gecko Google Calendar" version 1.6.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
120 characters long description:
Gecko Google Calendar connects your site to Google Calendar and allows events to be displayed on pages using shortcodes.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin81,077 lines of code in 537 files:
LanguageFilesBlank linesComment linesLines of code
PHP44342,97980,48851,946
JavaScript41,5671,10711,092
TypeScript249584,3175,486
JSON21004,704
Markdown281,40304,583
CSS271293,003
Sass9452175
XML33043
YAML29036
make1409

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.41
▷ Minimum class complexity1.00
▷ Maximum class complexity592.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces38
Interfaces25
Traits6
Classes425
▷ Abstract classes102.35%
▷ Concrete classes41597.65%
▷ Final classes92.17%
Methods3,407
▷ Static methods1343.93%
▷ Public methods2,94986.56%
▷ Protected methods2045.99%
▷ Private methods2547.46%
Functions245
▷ Named functions7229.39%
▷ Anonymous functions17370.61%
Constants322
▷ Global constants216.52%
▷ Class constants30193.48%
▷ Public constants301100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin