74% wp-prevent-right-click-content-copy

Code Review | prevent right click and content copy

WordPress plugin prevent right click and content copy scored74%from 54 tests.

About plugin

  • Plugin page: wp-prevent-right-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 9, 2020
  • Latest release: May 23, 2020
  • Number of updates: 14
  • Update frequency: every 1.0 days
  • Top authors: rkramesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /674 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.64ms] Passed 4 tests

An overview of server-side resources used by prevent right click and content copy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.81 ▼38.24
Dashboard /wp-admin2.05 ▼1.264.72 ▼42.84
Posts /wp-admin/edit.php2.05 ▼1.316.05 ▼40.98
Add New Post /wp-admin/post-new.php2.05 ▼3.844.82 ▼88.48
Media Library /wp-admin/upload.php2.05 ▼1.185.33 ▼33.60

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

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

Browser metrics Passed 4 tests

Checking browser requirements for prevent right click and content copy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲14413.57 ▼0.717.75 ▲5.7240.66 ▼11.66
Dashboard /wp-admin2,206 ▲184.86 ▼0.05111.42 ▲6.0542.57 ▼1.19
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0239.84 ▼4.9535.52 ▼5.50
Add New Post /wp-admin/post-new.php1,534 ▼023.40 ▲0.34663.15 ▼8.8457.19 ▲4.06
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0297.23 ▼13.4142.14 ▼2.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/wp-prevent-right-click-content-copy/wp-prevent-right-click-content-copy.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

wp-prevent-right-click-content-copy/wp-prevent-right-click-content-copy.php 92% from 13 tests

The main PHP script in "prevent right click and content copy" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 188 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
Good job! No executable or dangerous file extensions detected97 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1151697

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.89
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%
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
No PNG files were detected