94% content-lock

Code Review | Content Lock

WordPress plugin Content Lock scored 94% from 54 tests.

About plugin

  • Plugin page: content-lock
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.8.1
  • First release: Apr 6, 2013
  • Latest release: Apr 6, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: ryanstreet (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 4,153 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼141.90ms] Passed 4 tests

This is a short check of server-side resources used by Content Lock
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1529.90 ▲9.57
Dashboard /wp-admin3.10 ▲0.0439.78 ▼4.37
Posts /wp-admin/edit.php3.15 ▲0.0439.08 ▼5.89
Add New Post /wp-admin/post-new.php5.46 ▲0.0393.97 ▼554.31
Media Library /wp-admin/upload.php3.04 ▲0.0429.93 ▼3.04

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Content Lock: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.88 ▼0.3310.48 ▲1.4651.67 ▼3.04
Dashboard /wp-admin2,973 ▲365.93 ▼0.05136.71 ▼5.24114.91 ▲0.04
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0164.58 ▲0.6488.13 ▲3.87
Add New Post /wp-admin/post-new.php1,872 ▲37218.93 ▲0.39366.76 ▼10.19107.21 ▲0.49
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.02145.84 ▲7.47124.90 ▲7.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% 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 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-lock/content-lock.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

content-lock/content-lock.php Passed 13 tests

The main PHP script in "Content Lock" version 1.0 is automatically included on every request by WordPress
56 characters long description:
Show or hide your content with a wide variety of options

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected134 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1381.25%
▷ Protected methods318.75%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin