90% disable-right-click-for-wp

Code Review | Disable Right Click For WP

WordPress plugin Disable Right Click For WP scored90%from 54 tests.

About plugin

  • Plugin page: disable-right-cli...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.0
  • WordPress version: 6.3.1
  • First release: Nov 8, 2018
  • Latest release: Jul 2, 2022
  • Number of updates: 27
  • Update frequency: every 49.3 days
  • Top authors: aftabmuni (100%)

Code review

54 tests

User reviews

41 reviews

Install metrics

30,000+ active /125,529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.48ms] Passed 4 tests

A check of server-side resources used by Disable Right Click For WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.60 ▼2.99
Dashboard /wp-admin3.33 ▼0.0245.65 ▼12.38
Posts /wp-admin/edit.php3.38 ▲0.0241.67 ▼13.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.76 ▼8.83
Media Library /wp-admin/upload.php3.25 ▲0.0233.35 ▼1.30
Disable Right Click For WP /wp-admin/options-general.php?page=disable_right_click_for_wp_dashboard3.2228.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Disable Right Click For WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.24 ▲0.301.68 ▼0.2041.84 ▲2.24
Dashboard /wp-admin2,193 ▲165.55 ▼0.0984.35 ▼8.1037.75 ▼2.62
Posts /wp-admin/edit.php2,104 ▲71.98 ▼0.1835.12 ▼4.0731.24 ▼12.60
Add New Post /wp-admin/post-new.php1,531 ▲522.89 ▼0.01585.33 ▼145.7458.91 ▼4.36
Media Library /wp-admin/upload.php1,398 ▼24.22 ▲0.0398.13 ▼7.7045.64 ▼0.86
Disable Right Click For WP /wp-admin/options-general.php?page=disable_right_click_for_wp_dashboard8412.0424.8329.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: copyright protection, no copy paste, prevent right click, stop image saving with right click, stop right click...

disable-right-click-for-wp/disable-right-click-for-wp.php 92% from 13 tests

The main PHP script in "Disable Right Click For WP" version 1.1.6 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 244 characters long)

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
No dangerous file extensions were detected144 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21423144

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.59
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin