83% easy-disable-right-click

Code Review | Easy Disable Source, No Right-click, Image and Content Protection

WordPress plugin Easy Disable Source, No Right-click, Image and Content Protection scored83%from 54 tests.

About plugin

  • Plugin page: easy-disable-righ...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 14
  • Update frequency: every 13.0 days
  • Top authors: emranpk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /269 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: ▼2.22ms] Passed 4 tests

Analyzing server-side resources used by Easy Disable Source, No Right-click, Image and Content Protection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.87 ▼5.14
Dashboard /wp-admin3.37 ▲0.0748.39 ▲1.67
Posts /wp-admin/edit.php3.42 ▲0.0751.03 ▲4.65
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.55 ▼7.18
Media Library /wp-admin/upload.php3.29 ▲0.0632.92 ▲1.78
Disable Right-Click /wp-admin/options-general.php?page=disable-right-click3.2632.69

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Easy Disable Source, No Right-click, Image and Content Protection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4614.71 ▲0.361.64 ▼0.0436.76 ▼5.28
Dashboard /wp-admin2,216 ▲355.71 ▼0.0289.51 ▼22.7538.24 ▼7.17
Posts /wp-admin/edit.php2,121 ▲182.01 ▲0.0737.95 ▼2.0732.78 ▼4.66
Add New Post /wp-admin/post-new.php6,242 ▲4,71618.70 ▼4.40842.55 ▲223.9365.19 ▲12.19
Media Library /wp-admin/upload.php1,418 ▲214.15 ▼0.1494.20 ▼3.3042.07 ▲0.88
Disable Right-Click /wp-admin/options-general.php?page=disable-right-click9202.1327.7532.95

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-disable-right-click/disable-right-click.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version format is invalid
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (settings), #2 (setting for post/page)
The official readme.txt is a good inspiration

easy-disable-right-click/disable-right-click.php 85% from 13 tests

The primary PHP file in "Easy Disable Source, No Right-click, Image and Content Protection" version 2.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-disable-right-click.php" instead of "disable-right-click.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

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 detected502 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP110750341
JavaScript42940104
CSS29657

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin