79% lockee

Code Review | Lockee

WordPress plugin Lockee scored79%from 54 tests.

About plugin

  • Plugin page: lockee
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Dec 2, 2022
  • Number of updates: 57
  • Update frequency: every 11.5 days
  • Top authors: ndesmarets (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /4,371 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.63MB] [CPU: ▼22.55ms] Passed 4 tests

A check of server-side resources used by Lockee
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.92 ▼1.12
Dashboard /wp-admin3.39 ▲0.0444.52 ▼17.23
Posts /wp-admin/edit.php3.44 ▲0.0843.76 ▼4.00
Add New Post /wp-admin/post-new.php3.17 ▼2.7234.39 ▼67.84
Media Library /wp-admin/upload.php3.31 ▲0.0837.36 ▲1.83

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Lockee
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17814.72 ▲0.438.79 ▲7.0340.48 ▼1.08
Dashboard /wp-admin2,208 ▲285.62 ▼0.0295.67 ▲5.8137.86 ▼0.91
Posts /wp-admin/edit.php2,119 ▲162.70 ▲0.7538.46 ▲1.7436.10 ▲4.09
Add New Post /wp-admin/post-new.php6,415 ▲4,88920.07 ▼3.47925.44 ▲253.6446.00 ▼3.19
Media Library /wp-admin/upload.php1,426 ▲235.08 ▲0.9193.22 ▼2.5741.03 ▼1.45

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lockee/fast-ajax.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lockee/lockee.php:289

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: posts, locks

lockee/lockee.php Passed 13 tests

This is the main PHP file of "Lockee" version 2.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
39 characters long description:
Ajoute les cadenas Lockee à Wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,025 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS5245151,572
JavaScript4151221,153
PHP22712300

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 0.20MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/B-dark.png14.61KB3.17KB▼ 78.31%
imgs/E-light.png8.33KB3.66KB▼ 56.07%
imgs/D-light.png13.55KB2.94KB▼ 78.27%
imgs/layers-2x.png1.23KB1.67KB0.00%
imgs/B-light.png13.86KB3.17KB▼ 77.12%