73% secure-copy-content-protection

Code Review | Secure Copy Content Protection and Content Locking

WordPress plugin Secure Copy Content Protection and Content Locking scored73%from 54 tests.

About plugin

  • Plugin page: secure-copy-conte...
  • Plugin version: 3.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 26, 2018
  • Latest release: Nov 28, 2023
  • Number of updates: 611
  • Update frequency: every 3.0 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

48 reviews

Install metrics

20,000+ active /1,260,166 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.04MB] [CPU: ▼0.73ms] Passed 4 tests

This is a short check of server-side resources used by Secure Copy Content Protection and Content Locking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.83 ▲1.3749.42 ▲6.63
Dashboard /wp-admin4.34 ▲0.9952.57 ▼8.87
Posts /wp-admin/edit.php4.37 ▲1.0256.57 ▲9.90
Add New Post /wp-admin/post-new.php6.99 ▲1.1087.04 ▼7.91
Media Library /wp-admin/upload.php4.29 ▲1.0742.41 ▲7.25
Our Products /wp-admin/admin.php?page=secure-copy-content-protection-featured-plugins4.3541.86
Copy Protection /wp-admin/admin.php?page=secure-copy-content-protection5.5263.51
Subscribe to view /wp-admin/admin.php?page=secure-copy-content-protection-subscribe-to-view4.3548.26
Results /wp-admin/admin.php?page=secure-copy-content-protection-results-to-view4.3747.51
PRO Features /wp-admin/admin.php?page=secure-copy-content-protection-pro-features4.3644.69
General Settings /wp-admin/admin.php?page=secure-copy-content-protection-settings4.7248.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 119 new files
Database: 5 new tables, 10 new options
New tables
wp_ays_sccp
wp_ays_sccp_settings
wp_ays_sccp_block_subscribe
wp_ays_sccp_block_content
wp_ays_sccp_reports
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
ays_sccp_sale_btn_for_two_months
widget_recent-posts
ays_sccp_sale_btn
ays_sccp_banner_time
sccp_db_version
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Secure Copy Content Protection and Content Locking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲24313.45 ▼0.7611.07 ▲8.8631.46 ▼19.08
Dashboard /wp-admin2,298 ▲1215.58 ▼0.0692.82 ▼4.6777.32 ▲33.21
Posts /wp-admin/edit.php2,221 ▲1211.99 ▲0.0538.92 ▼1.1236.39 ▼1.32
Add New Post /wp-admin/post-new.php1,788 ▲26222.18 ▼1.36628.42 ▼51.1448.42 ▼1.70
Media Library /wp-admin/upload.php1,515 ▲1124.26 ▲0.0495.79 ▼5.0182.59 ▲39.40
Our Products /wp-admin/admin.php?page=secure-copy-content-protection-featured-plugins1,8076.40136.89144.01
Copy Protection /wp-admin/admin.php?page=secure-copy-content-protection6,58211.57466.97208.98
Subscribe to view /wp-admin/admin.php?page=secure-copy-content-protection-subscribe-to-view1,8246.3781.77145.13
Results /wp-admin/admin.php?page=secure-copy-content-protection-results-to-view2,2506.5089.77142.21
PRO Features /wp-admin/admin.php?page=secure-copy-content-protection-pro-features2,1786.3275.75155.45
General Settings /wp-admin/admin.php?page=secure-copy-content-protection-settings5,0047.73179.81171.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables were found after uninstall: 5 tables
    • wp_ays_sccp
    • wp_ays_sccp_block_content
    • wp_ays_sccp_settings
    • wp_ays_sccp_block_subscribe
    • wp_ays_sccp_reports
  • The uninstall procedure has failed, leaving 10 options in the database
    • ays_sccp_sale_btn_for_two_months
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • ays_sccp_sale_btn
    • widget_recent-posts
    • ays_sccp_banner_time
    • widget_recent-comments
    • can_compress_scripts
    • sccp_db_version

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/secure-copy-content-protection/db.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/secure-copy-content-protection/admin/partials/features/secure-copy-content-protection-pro-features.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/secure-copy-content-protection/admin/partials/features/secure-copy-content-protection-featured-display.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/secure-copy-content-protection/admin/partials/settings/secure-copy-content-protection-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/secure-copy-content-protection/public/partials/secure-copy-content-protection-public-display.php:15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/secure-copy-content-protection/db.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_charset_collate() on null in wp-content/plugins/secure-copy-content-protection/db.php:28
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/secure-copy-content-protection/db.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/secure-copy-content-protection/admin/partials/secure-copy-content-protection-admin-display.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/secure-copy-content-protection/includes/lists/class-secure-copy-content-protection-results-list-table.php:4

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can look at the official readme.txt

secure-copy-content-protection/secure-copy-content-protection.php Passed 13 tests

The main PHP script in "Secure Copy Content Protection and Content Locking" version 3.8.2 is automatically included on every request by WordPress
117 characters long description:
Copy Protection plugin is activated it disables the right click, copy paste, content selection and copy shortcut keys

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin18,860 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,2061,0869,352
JavaScript124174593,638
CSS96899182,821
PO File29641,2792,489
SVG14620560

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 197)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity73.54
▷ Minimum class complexity1.00
▷ Maximum class complexity329.00
Average method complexity7.88
▷ Minimum method complexity1.00
▷ Maximum method complexity197.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods137
▷ Static methods2417.52%
▷ Public methods13195.62%
▷ Protected methods00.00%
▷ Private methods64.38%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
39 PNG files occupy 1.16MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/chart_screen.png28.53KB28.86KB0.00%
admin/images/avatars/pro_avatar.png38.46KB13.75KB▼ 64.26%
admin/images/black_friday_banner_logo.png34.91KB35.05KB0.00%
public/images/lock.png0.57KB0.52KB▼ 8.36%
admin/images/features/page_blocker.png12.21KB6.31KB▼ 48.31%