78% locker-cat

Code Review | Social Locker & Content Locker - Locker Cat

WordPress plugin Social Locker & Content Locker - Locker Cat scored78%from 54 tests.

About plugin

  • Plugin page: locker-cat
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Mar 16, 2017
  • Latest release: Jul 19, 2018
  • Number of updates: 18
  • Update frequency: every 26.9 days
  • Top authors: davidhme (88.89%)fatcatapps (16.67%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /10,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Social Locker & Content Locker - Locker Cat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.67 ▼0.48
Dashboard /wp-admin3.42 ▲0.1148.48 ▼5.21
Posts /wp-admin/edit.php3.47 ▲0.1145.55 ▼12.45
Add New Post /wp-admin/post-new.php6.00 ▲0.1186.88 ▼12.36
Media Library /wp-admin/upload.php3.34 ▲0.1134.87 ▼2.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Social Locker & Content Locker - Locker Cat: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.22 ▼1.141.64 ▼0.2039.83 ▼3.67
Dashboard /wp-admin2,218 ▲275.83 ▼0.0695.36 ▼3.3677.78 ▲31.23
Posts /wp-admin/edit.php2,101 ▲122.14 ▲0.1436.70 ▼1.2039.41 ▲1.53
Add New Post /wp-admin/post-new.php1,539 ▲123.38 ▲0.34706.69 ▲32.4451.04 ▼2.03
Media Library /wp-admin/upload.php1,406 ▲214.13 ▲0.01118.59 ▲10.9746.00 ▲2.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/locker-cat/languages/index.php
    • > /wp-content/plugins/locker-cat/locker-cat.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/locker-cat/includes/editor/editor.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/locker-cat/includes/upgrade.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/locker-cat/includes/locker/locker.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/locker-cat/includes/editor/sidebar.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/locker-cat/includes/api.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (A Social Locker built with Social Locker & Content Locker - Locker Cat.), #2 (The user interface of Social Locker & Content Locker - Locker Cat.)
The official readme.txt is a good inspiration

locker-cat/locker-cat.php Passed 13 tests

The entry point to "Social Locker & Content Locker - Locker Cat" version 1.0.1 is a PHP file that has certain tags in its header comment area
45 characters long description:
Provides an easy way to create Social Lockers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,017 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP814547516
CSS12307288
JavaScript125222213

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.23
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
5 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png26.21KB28.56KB0.00%
assets/fatcatapps-logo-text.png16.24KB4.88KB▼ 69.97%
screenshot-2.png18.62KB20.10KB0.00%
assets/LockerCat_icon128x128.png27.32KB7.90KB▼ 71.09%
assets/icon.png0.73KB0.60KB▼ 17.38%