73% secure-copy-content-protection

Code Review | Secure Copy Content Protection and Content Locking

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

About plugin

  • Plugin page: secure-copy-conte...
  • Plugin version: 3.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Oct 26, 2018
  • Latest release: Mar 29, 2022
  • Number of updates: 451
  • Update frequency: every 2.8 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

10,000+ active / 569,798 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.88MB] [CPU: ▼307.19ms] 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.69 ▲1.1883.61 ▲19.07
Dashboard /wp-admin4.20 ▲0.7945.37 ▼6.80
Posts /wp-admin/edit.php4.41 ▲0.7750.33 ▲7.24
Add New Post /wp-admin/post-new.php8.05 ▲1.0898.26 ▼1,221.08
Media Library /wp-admin/upload.php4.16 ▲0.8741.19 ▼8.12
Results /wp-admin/admin.php?page=secure-copy-content-protection-results-to-view4.2541.43
Subscribe to view /wp-admin/admin.php?page=secure-copy-content-protection-subscribe-to-view4.2337.63
Our Products /wp-admin/admin.php?page=secure-copy-content-protection-featured-plugins4.2337.56
Copy Protection /wp-admin/admin.php?page=secure-copy-content-protection5.3351.29
General Settings /wp-admin/admin.php?page=secure-copy-content-protection-settings4.2443.71
PRO Features /wp-admin/admin.php?page=secure-copy-content-protection-pro-features4.2335.73

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 94 new files
Database: 5 new tables, 3 new options
New tables
wp_ays_sccp_block_subscribe
wp_ays_sccp
wp_ays_sccp_reports
wp_ays_sccp_settings
wp_ays_sccp_block_content
New WordPress options
ays_sccp_sale_notification_spring
sccp_db_version
ays_sccp_sale_dismiss_for_two_month_spring

Browser metrics Passed 4 tests

Secure Copy Content Protection and Content Locking: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,042 ▲29716.49 ▲1.1219.17 ▲10.982.97 ▼0.51
Dashboard /wp-admin3,024 ▲1006.44 ▲0.01186.09 ▼19.53215.48 ▲14.75
Posts /wp-admin/edit.php2,786 ▲653.43 ▼0.0187.73 ▼8.69188.61 ▲10.27
Add New Post /wp-admin/post-new.php1,707 ▲9416.03 ▼4.60651.95 ▲8.46220.30 ▲11.68
Media Library /wp-admin/upload.php1,792 ▲655.75 ▲0.01186.91 ▼13.86282.03 ▲24.56
Results /wp-admin/admin.php?page=secure-copy-content-protection-results-to-view2,6718.79198.33379.55
Subscribe to view /wp-admin/admin.php?page=secure-copy-content-protection-subscribe-to-view2,1028.63193.04408.67
Our Products /wp-admin/admin.php?page=secure-copy-content-protection-featured-plugins2,0888.18135.99385.58
Copy Protection /wp-admin/admin.php?page=secure-copy-content-protection10,76917.19560.10498.75
General Settings /wp-admin/admin.php?page=secure-copy-content-protection-settings2,4758.44140.95414.43
PRO Features /wp-admin/admin.php?page=secure-copy-content-protection-pro-features2,7458.42138.59385.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 5 tables
    • wp_ays_sccp_reports
    • wp_ays_sccp_settings
    • wp_ays_sccp_block_content
    • wp_ays_sccp_block_subscribe
    • wp_ays_sccp
  • The uninstall procedure has failed, leaving 3 options in the database
    • ays_sccp_sale_notification_spring
    • ays_sccp_sale_dismiss_for_two_month_spring
    • sccp_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > 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 Fatal error
      Uncaught Error: Class 'Secure_Copy_Content_Protection_Subscribe_Actions' not found in wp-content/plugins/secure-copy-content-protection/admin/partials/subscribe/secure-copy-content-protection-subscribe-display.php:2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/secure-copy-content-protection/db.php on line 8
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/secure-copy-content-protection/db.php on line 16
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/secure-copy-content-protection/db.php on line 20
    • > 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 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 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/secure-copy-content-protection/admin/partials/features/secure-copy-content-protection-featured-display.php:5
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: You can look at the official readme.txt

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

The primary PHP file in "Secure Copy Content Protection and Content Locking" version 3.0.6 is used by WordPress to initiate all plugin functionality
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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected14,843 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP249021,0177,388
JavaScript123834313,419
CSS9352551,955
PO File27059501,618
SVG4620463

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 192)
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity55.23
▷ Minimum class complexity1.00
▷ Maximum class complexity220.00
Average method complexity7.03
▷ Minimum method complexity1.00
▷ Maximum method complexity192.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods117
▷ Static methods1613.68%
▷ Public methods11194.87%
▷ Protected methods00.00%
▷ Private methods65.13%
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
32 PNG files occupy 0.96MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icons/icon-popup-128x128.png2.17KB2.17KB0.05%
admin/images/winter-backround-bundle.png195.70KB95.87KB▼ 51.01%
admin/images/sale.png1.96KB1.92KB▼ 1.70%
admin/images/pngegg110.png8.90KB4.03KB▼ 54.73%
admin/images/winter_bundle_logo.png25.05KB6.65KB▼ 73.46%