71% content-locker-for-elementor

Code Review | Content Locker for Elementor

WordPress plugin Content Locker for Elementor scored71%from 54 tests.

About plugin

  • Plugin page: content-locker-fo...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2020
  • Latest release: Oct 12, 2023
  • Number of updates: 11
  • Update frequency: every 120.4 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,888 total downloads

Benchmarks

Plugin footprint 82% 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.52MB] [CPU: ▲704.85ms] 50% from 4 tests

An overview of server-side resources used by Content Locker for Elementor
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 672.67ms on /wp-admin/options-general.php?page=content-locker-for-elementor-recommended-plugins)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 704.85ms on /wp-admin/options-general.php?page=content-locker-for-elementor-recommended-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.76698.41 ▲659.96
Dashboard /wp-admin3.87 ▲0.57753.90 ▲695.78
Posts /wp-admin/edit.php4.00 ▲0.64830.93 ▲783.85
Add New Post /wp-admin/post-new.php6.12 ▲0.23778.16 ▲679.82
Media Library /wp-admin/upload.php3.88 ▲0.65835.15 ▲801.32
Recommended /wp-admin/options-general.php?page=content-locker-for-elementor-recommended-plugins3.85672.67

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 49 new files
Database: no new tables, 13 new options
New WordPress options
jltelcl_sheet_promo_data_hash
jltelcl_notice_subscribe
jltelcl_notice_what_we_collect
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
content_locker_for_elementor_version
can_compress_scripts
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Content Locker for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,084 ▲32313.82 ▼0.557.92 ▲6.3337.27 ▼3.93
Dashboard /wp-admin2,383 ▲2065.66 ▲0.0786.31 ▲2.0140.15 ▼4.86
Posts /wp-admin/edit.php2,217 ▲1172.29 ▲0.2936.23 ▲2.6233.43 ▼0.18
Add New Post /wp-admin/post-new.php1,629 ▲10221.33 ▼1.89617.29 ▼70.6063.68 ▲5.23
Media Library /wp-admin/upload.php1,514 ▲1174.22 ▲0.0396.81 ▲0.0240.93 ▼5.42
Recommended /wp-admin/options-general.php?page=content-locker-for-elementor-recommended-plugins1,2881.7728.9127.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 13 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • jltelcl_activation_time
    • widget_recent-comments
    • jltelcl_notice_ask_for_rating
    • widget_theysaidso_widget
    • db_upgraded
    • content_locker_for_elementor_version
    • can_compress_scripts
    • jltelcl_sheet_promo_data
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=content-locker-for-elementor-recommended-plugins
    • > Warning in wp-content/plugins/content-locker-for-elementor/class-content-locker-for-elementor.php+127
    Use of undefined constant CLE_TD - assumed 'CLE_TD' (this will throw an Error in a future version of PHP)

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
Please fix the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELCL\\Libs\\Recommended' not found in wp-content/plugins/content-locker-for-elementor/Inc/Classes/Recommended_Plugins.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELCL\\Libs\\RowLinks' not found in wp-content/plugins/content-locker-for-elementor/Inc/Classes/Row_Links.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/content-locker-for-elementor/content-locker-for-elementor.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELCL\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/content-locker-for-elementor/Inc/Classes/Notifications/What_We_Collect.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELCL\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/content-locker-for-elementor/Inc/Classes/Notifications/Subscribe.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELCL\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/content-locker-for-elementor/Inc/Classes/Notifications/Ask_For_Rating.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELCL\\Libs\\Upgrader' not found in wp-content/plugins/content-locker-for-elementor/Inc/Classes/Upgrade_Plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTELCL\\Inc\\Classes\otifications\\Model\\Popup' not found in wp-content/plugins/content-locker-for-elementor/Inc/Classes/Notifications/Upgrade_Notice.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=content-locker-for-elementor-recommended-plugins
    • > Network (severe)
    https://ps.w.org/ultimate-blocks-for-gutenberg/assets/icon-128x128.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: A description for screenshot #5 is required in content-locker-for-elementor/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

content-locker-for-elementor/content-locker-for-elementor.php 77% from 13 tests

The principal PHP file in "Content Locker for Elementor" v. 1.0.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages/")
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages/")

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
No dangerous file extensions were detected6,293 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP391,0101,4854,219
CSS4319281,919
JavaScript2159154
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.10
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces0
Traits2
Classes28
▷ Abstract classes414.29%
▷ Concrete classes2485.71%
▷ Final classes14.17%
Methods218
▷ Static methods3817.43%
▷ Public methods21096.33%
▷ Protected methods62.75%
▷ Private methods20.92%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants18
▷ Global constants1583.33%
▷ Class constants316.67%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.19MB with 0.19MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/dropdown.png5.00KB0.00KB▼ 100.00%
(invalid) assets/images/promo-image.png185.79KB0.00KB▼ 100.00%