78% jcwp-copy-paste-blocker

Code Review | jcwp copy paste blocker

WordPress plugin jcwp copy paste blocker scored78%from 54 tests.

About plugin

  • Plugin page: jcwp-copy-paste-b...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 24, 2012
  • Latest release: Jun 29, 2015
  • Number of updates: 11
  • Update frequency: every 97.4 days
  • Top authors: jaschahal (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

400+ active /10,901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.02ms] Passed 4 tests

Server-side resources used by jcwp copy paste blocker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.50 ▲1.55
Dashboard /wp-admin3.37 ▲0.0746.96 ▼5.04
Posts /wp-admin/edit.php3.42 ▲0.0648.69 ▼4.87
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.50 ▼7.17
Media Library /wp-admin/upload.php3.29 ▲0.0634.77 ▼2.99
JCWP CopyPaste Blocker /wp-admin/options-general.php?page=jcorgcpb-plugin3.2329.04

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 15 new options
New WordPress options
widget_theysaidso_widget
jcorgcpb_alert_message
can_compress_scripts
jcorgcpb_linkback_text
jcorgcpb_disable_selection
widget_recent-comments
jcorgcpb_alert
jcorgcpb_disable_keys
widget_recent-posts
jcorgcpb_where_on
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for jcwp copy paste blocker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲19413.61 ▼0.978.78 ▲6.8843.84 ▲3.39
Dashboard /wp-admin2,209 ▲215.81 ▼0.0998.40 ▼3.4938.16 ▼2.47
Posts /wp-admin/edit.php2,098 ▲92.01 ▲0.0039.66 ▼3.2334.80 ▼0.32
Add New Post /wp-admin/post-new.php1,542 ▲2318.30 ▼4.91615.54 ▼100.7552.88 ▼0.50
Media Library /wp-admin/upload.php1,397 ▲64.20 ▼0.0596.43 ▼8.5346.42 ▼0.85
JCWP CopyPaste Blocker /wp-admin/options-general.php?page=jcorgcpb-plugin1,0351.8424.8042.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 15 options in the database
    • jcorgcpb_disable_keys
    • widget_recent-comments
    • db_upgraded
    • jcorgcpb_where_on
    • jcorgcpb_linkback
    • jcorgcpb_linkback_text
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • jcorgcpb_disable_right_mouse_click
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=jcorgcpb-plugin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=jcorgcpb-plugin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/jcwp-copy-paste-blocker/jcwp-copy-paste-blocker.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Screenshots: These screenshots require images: #1 (A screen shot of the options page), #2 (Shows alert message when someone tries to select text from your post or page)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === jcwp-copy-paste-blocker === )
You can look at the official readme.txt

jcwp-copy-paste-blocker/jcwp-copy-paste-blocker.php Passed 13 tests

This is the main PHP file of "jcwp copy paste blocker" version 1.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
81 characters long description:
This plugin blocks text selections and right clicks on your blog pages and posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected312 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11616264
JavaScript10048

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.64
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.50MB with 0.36MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png426.55KB111.58KB▼ 73.84%
screenshot-1.png80.85KB21.74KB▼ 73.11%