84% connect-your-nuki-smartlock

Code Review | Connect Nuki Smartlock

WordPress plugin Connect Nuki Smartlock scored84%from 54 tests.

About plugin

  • Plugin page: connect-your-nuki...
  • Plugin version: 1.3.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2022
  • Latest release: May 30, 2023
  • Number of updates: 59
  • Update frequency: every 4.5 days
  • Top authors: sebastienserre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,522 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.54ms] Passed 4 tests

A check of server-side resources used by Connect Nuki Smartlock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.96 ▼9.43
Dashboard /wp-admin3.31 ▲0.0143.86 ▼8.38
Posts /wp-admin/edit.php3.45 ▲0.0949.99 ▼2.21
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.58 ▼10.12
Media Library /wp-admin/upload.php3.26 ▲0.0335.64 ▼1.09
Licenses /wp-admin/admin.php?page=connect_nuki_licenses3.2234.80
Nuki Settings /wp-admin/admin.php?page=connect_your_nuki_smartlock3.2232.40

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Connect Nuki Smartlock: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.36 ▼0.261.76 ▼0.9341.34 ▼4.68
Dashboard /wp-admin2,257 ▲865.59 ▼0.0885.46 ▼15.5042.33 ▼2.87
Posts /wp-admin/edit.php2,129 ▲322.02 ▲0.0438.63 ▼0.2335.79 ▲0.14
Add New Post /wp-admin/post-new.php1,550 ▲2223.08 ▼0.04698.13 ▲31.4768.02 ▲10.66
Media Library /wp-admin/upload.php1,423 ▲234.18 ▼0.0398.09 ▼10.0047.13 ▼0.86
Licenses /wp-admin/admin.php?page=connect_nuki_licenses7972.0025.5027.58
Nuki Settings /wp-admin/admin.php?page=connect_your_nuki_smartlock8082.0024.5927.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nuki\\Dashboard\\add_action() in wp-content/plugins/connect-your-nuki-smartlock/inc/Dashboard.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: smartlock, nuki, automation, bookings

connect-your-nuki-smartlock/connect-your-nuki-smartlock.php Passed 13 tests

"Connect Nuki Smartlock" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Connect your Nuki Smartlock to your WordPress and manage it!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,157 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP5155294856
Bourne Shell12311147
YAML17064
Sass34054
CSS221036

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity30.33
▷ Minimum class complexity4.00
▷ Maximum class complexity56.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected