84% latch

Code Review | Latch

WordPress plugin Latch scored84%from 54 tests.

About plugin

  • Plugin page: latch
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-6.2
  • WordPress version: 6.3.1
  • First release: May 13, 2014
  • Latest release: Jul 17, 2023
  • Number of updates: 20
  • Update frequency: every 167.8 days
  • Top authors: it.elevenpaths (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /9,403 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.24ms] Passed 4 tests

A check of server-side resources used by Latch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.30 ▼1.64
Dashboard /wp-admin3.42 ▲0.1146.21 ▼4.67
Posts /wp-admin/edit.php3.53 ▲0.1747.28 ▼2.49
Add New Post /wp-admin/post-new.php6.00 ▲0.1193.55 ▼4.17
Media Library /wp-admin/upload.php3.34 ▲0.1135.00 ▲0.97
Latch settings /wp-admin/options-general.php?page=latch_wordpress3.3032.63

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Latch: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.16 ▼1.481.69 ▼0.4742.15 ▼4.81
Dashboard /wp-admin2,213 ▲614.87 ▼0.8397.63 ▼11.7138.94 ▼7.20
Posts /wp-admin/edit.php2,096 ▲101.99 ▼0.0238.76 ▼0.3636.11 ▲3.16
Add New Post /wp-admin/post-new.php1,540 ▲2118.59 ▼4.78583.82 ▼86.6453.57 ▼7.94
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.0296.58 ▼10.5241.59 ▼6.11
Latch settings /wp-admin/options-general.php?page=latch_wordpress8052.0322.8226.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Telefonica\\Latch\\LatchAuth' not found in wp-content/plugins/latch/vendor/Telefonica/latch-sdk-php/src/LatchUser.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Telefonica\\Latch\\LatchApp' not found in wp-content/plugins/latch/vendor/Telefonica/latch-sdk-php/src/Latch.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Telefonica\\Latch\\LatchAuth' not found in wp-content/plugins/latch/vendor/Telefonica/latch-sdk-php/src/LatchApp.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latch/latch.php:254
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/latch/two_factor.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
3 plugin tags: authentication, plugin, security

latch/latch.php Passed 13 tests

Analyzing the main PHP file in "Latch" version 2.5
27 characters long description:
Latch WordPress integration

Code Analysis Passed 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
No dangerous file extensions were detected1,479 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP193176931,251
PO File23434102
JSON30095
Markdown112031

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.36
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes110.00%
Methods105
▷ Static methods4038.10%
▷ Public methods9287.62%
▷ Protected methods54.76%
▷ Private methods87.62%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin