10% lockme-calendars-integration

Code Review | Lockme OAuth2 calendars integration

WordPress plugin Lockme OAuth2 calendars integration scored10%from 54 tests.

About plugin

  • Plugin page: lockme-calendars-...
  • Plugin version: 2.3.2
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Dec 17, 2017
  • Latest release: Aug 24, 2023
  • Number of updates: 218
  • Update frequency: every 9.5 days
  • Top authors: lustmored (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,244 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > User error in wp-content/plugins/lockme-calendars-integration/build/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16.

Server metrics [RAM: ▼1.91MB] [CPU: ▼57.23ms] Passed 4 tests

This is a short check of server-side resources used by Lockme OAuth2 calendars integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.51 ▼31.46
Dashboard /wp-admin2.09 ▼1.215.95 ▼46.93
Posts /wp-admin/edit.php2.10 ▼1.265.46 ▼46.12
Add New Post /wp-admin/post-new.php2.10 ▼3.796.44 ▼102.79
Media Library /wp-admin/upload.php2.10 ▼1.135.12 ▼33.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 256 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Lockme OAuth2 calendars integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.42 ▼0.231.70 ▲0.0943.58 ▲1.56
Dashboard /wp-admin2,189 ▲155.65 ▲0.0796.88 ▲0.4275.07 ▲32.49
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0235.77 ▼5.3133.94 ▼3.44
Add New Post /wp-admin/post-new.php1,528 ▼022.05 ▼1.08642.26 ▲3.3752.12 ▼4.86
Media Library /wp-admin/upload.php1,395 ▼54.11 ▼0.0895.53 ▼8.5340.08 ▼2.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User error in wp-content/plugins/lockme-calendars-integration/build/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16.
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_recent-posts
    • lockme_db_ver
    • can_compress_scripts
    • lockme_url_key
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lockme-calendars-integration/lockme-calendars-integration.php
  • 131× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/lockme-calendars-integration/build/vendor/symfony/lock/Store/PostgreSqlStore.php on line 49
    • > PHP Fatal error
      Uncaught Error: Class 'Lockme\\OAuth2\\Client\\Provider\\Lockme' not found in wp-content/plugins/lockme-calendars-integration/src/Libs/WrappedProvider.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'LockmeIntegration\\PluginInterface' not found in wp-content/plugins/lockme-calendars-integration/src/Plugins/Appointments.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'LockmeDep\\GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/lockme-calendars-integration/build/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:14
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/lockme-calendars-integration/build/vendor/symfony/lock/Store/DoctrineDbalStore.php on line 56
    • > PHP Fatal error
      Uncaught Error: Interface 'LockmeDep\\LockmeIntegration\\PluginInterface' not found in wp-content/plugins/lockme-calendars-integration/build/src/Plugins/Dopbsp.php:10
    • > PHP Fatal error
      Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16. in wp-content/plugins/lockme-calendars-integration/build/vendor/composer/platform_check.php on line 24
    • > PHP Fatal error
      Uncaught Error: Interface 'LockmeIntegration\\PluginInterface' not found in wp-content/plugins/lockme-calendars-integration/src/Plugins/Cpabc.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'LockmeDep\\Symfony\\Component\\Lock\\Exception\\ExceptionInterface' not found in wp-content/plugins/lockme-calendars-integration/build/vendor/symfony/lock/Exception/InvalidArgumentException.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'LockmeDep\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/lockme-calendars-integration/build/vendor/guzzlehttp/promises/src/RejectedPromise.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Main settings page for connection with Lockme API) image not found
  • Donate link: Invalid URI ("")
The official readme.txt might help

lockme-calendars-integration/lockme-calendars-integration.php Passed 13 tests

The primary PHP file in "Lockme OAuth2 calendars integration" version 2.3.2 is used by WordPress to initiate all plugin functionality
70 characters long description:
This plugin integrates popular booking systems with Lockme OAuth2 API.

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 detected23,179 lines of code in 243 files:
LanguageFilesBlank linesComment linesLines of code
PHP2391,33610,81421,513
JSON3001,663
Bourne Shell1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.10
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces37
Interfaces42
Traits14
Classes160
▷ Abstract classes31.88%
▷ Concrete classes15798.12%
▷ Final classes3924.84%
Methods1,519
▷ Static methods15410.14%
▷ Public methods1,17777.49%
▷ Protected methods1117.31%
▷ Private methods23115.21%
Functions285
▷ Named functions5720.00%
▷ Anonymous functions22880.00%
Constants83
▷ Global constants56.02%
▷ Class constants7893.98%
▷ Public constants6583.33%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png44.54KB17.32KB▼ 61.13%