79% smart-disable-right-click-on-website

Code Review | Smart Disable Right Click On Website

WordPress plugin Smart Disable Right Click On Website scored79%from 54 tests.

About plugin

  • Plugin page: smart-disable-rig...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 21, 2023
  • Latest release: Jan 21, 2023
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: smartsoftfirm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /143 total downloads

Benchmarks

Plugin footprint 83% 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.06MB] [CPU: ▼8.78ms] Passed 4 tests

A check of server-side resources used by Smart Disable Right Click On Website
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.19 ▼5.08
Dashboard /wp-admin3.36 ▲0.0644.53 ▼5.53
Posts /wp-admin/edit.php3.47 ▲0.1249.05 ▲4.48
Add New Post /wp-admin/post-new.php5.96 ▲0.0778.26 ▼24.58
Media Library /wp-admin/upload.php3.28 ▲0.0534.68 ▲0.07
Smart Disable Right Click /wp-admin/options-general.php?page=sdrc3.2330.01

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Smart Disable Right Click On Website: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.78 ▼0.778.37 ▲6.6843.25 ▲0.30
Dashboard /wp-admin2,206 ▲325.62 ▲0.0482.17 ▼6.9237.28 ▼9.30
Posts /wp-admin/edit.php2,108 ▲112.01 ▼0.0239.18 ▲3.3235.63 ▼0.24
Add New Post /wp-admin/post-new.php1,533 ▲523.27 ▲0.31611.48 ▼30.8760.30 ▲8.10
Media Library /wp-admin/upload.php1,405 ▲54.19 ▲0.0396.53 ▲1.4042.76 ▲0.82
Smart Disable Right Click /wp-admin/options-general.php?page=sdrc7611.9925.0022.65

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=sdrc
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'sdrc_options_page_html' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smart-disable-right-click-on-website/public/partials/smart-disable-right-click-on-website-public-display.php
    • > /wp-content/plugins/smart-disable-right-click-on-website/admin/partials/smart-disable-right-click-on-website-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: disable right click, disable right clcik menu, disable inspect element

smart-disable-right-click-on-website/smart-disable-right-click-on-website.php Passed 13 tests

The main file in "Smart Disable Right Click On Website" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
46 characters long description:
How do I make my website right-click disabled?

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
No dangerous file extensions were detected215 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12121540205
JavaScript368110
CSS2080

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.09
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected