78% visibility-control-for-learnpress

Code Review | Visibility Control for LearnPress

WordPress plugin Visibility Control for LearnPress scored 78% from 54 tests.

About plugin

  • Plugin page: visibility-contro...
  • Plugin version: 1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2020
  • Latest release: May 31, 2023
  • Number of updates: 15
  • Update frequency: every 70.8 days
  • Top authors: liveaspankaj (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active / 10,407 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.42ms] Passed 4 tests

This is a short check of server-side resources used by Visibility Control for LearnPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1937.82 ▼2.62
Dashboard /wp-admin3.50 ▲0.2047.91 ▼0.79
Posts /wp-admin/edit.php3.61 ▲0.2648.38 ▲2.56
Add New Post /wp-admin/post-new.php6.08 ▲0.1987.61 ▼12.84
Media Library /wp-admin/upload.php3.42 ▲0.1937.39 ▲3.79
Add-ons /wp-admin/admin.php?page=grassblade-addons3.2026.22
Visibility Control /wp-admin/admin.php?page=grassblade-visibility-control-learnpress3.3736.46

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
visibility_control_for_learnpress
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Visibility Control for LearnPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.25 ▼1.502.00 ▲0.2845.10 ▲0.04
Dashboard /wp-admin2,236 ▲475.95 ▲0.02112.64 ▼6.2576.29 ▲27.71
Posts /wp-admin/edit.php2,116 ▲272.01 ▲0.0537.96 ▼2.5638.16 ▼2.07
Add New Post /wp-admin/post-new.php1,537 ▲817.56 ▼0.72744.73 ▲111.0959.97 ▼16.59
Media Library /wp-admin/upload.php1,415 ▲274.24 ▲0.0594.67 ▼9.9565.32 ▲22.39
Add-ons /wp-admin/admin.php?page=grassblade-addons280.440.084.81
Visibility Control /wp-admin/admin.php?page=grassblade-visibility-control-learnpress8262.0225.3626.07

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • visibility_control_for_learnpress
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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× 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/visibility-control-for-learnpress/functions.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=grassblade-addons
    • > Network (severe)
    wp-admin/admin.php?page=grassblade-addons - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

visibility-control-for-learnpress/functions.php 85% from 13 tests

The main file in "Visibility Control for LearnPress" v. 1.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("visibility-control-for-learnpress.php" instead of "functions.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 826 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected605 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212519605

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.77
Average class complexity81.50
▷ Minimum class complexity47.00
▷ Maximum class complexity116.00
Average method complexity8.67
▷ Minimum method complexity2.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon-gb.png3.43KB0.84KB▼ 75.48%
img/icon_128x128.png22.67KB6.87KB▼ 69.71%
img/icon_30x30.png4.58KB1.60KB▼ 65.15%