84% copy-protection

Code Review | Copy Protection

WordPress plugin Copy Protection scored84%from 54 tests.

About plugin

  • Plugin page: copy-protection
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6
  • WordPress version: 6.3.1
  • First release: Nov 13, 2016
  • Latest release: Nov 19, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,647 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Copy Protection
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.23 ▼5.70
Dashboard /wp-admin3.31 ▲0.0148.69 ▼4.37
Posts /wp-admin/edit.php3.36 ▲0.0149.32 ▼4.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.02 ▼22.29
Media Library /wp-admin/upload.php3.23 ▲0.0135.36 ▼0.34

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Copy Protection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17713.58 ▼0.684.91 ▲3.1543.83 ▼0.41
Dashboard /wp-admin2,226 ▲415.83 ▲0.0197.23 ▼5.5879.73 ▲42.62
Posts /wp-admin/edit.php2,109 ▲172.01 ▲0.0235.61 ▼4.6132.81 ▼2.17
Add New Post /wp-admin/post-new.php1,682 ▲15422.69 ▼0.53718.96 ▲85.6456.46 ▲2.30
Media Library /wp-admin/upload.php1,405 ▲174.14 ▼0.07122.83 ▲12.8547.37 ▲2.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/copy-protection/inc/disable-right-cklick.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/copy-protection/copy-protection.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Admin Panel view of submitted form data.) image missing
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "Copy Protection" version 1.0
81 characters long description:
WP Content Copy Protection — WordPress Plugins. Simply amazing and easy to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin232 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2511685
CSS113072
PO File191041
JavaScript33234

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.58KB1.43KB▼ 9.69%
images/logo.png11.25KB4.39KB▼ 60.99%
screenshot-1.png8.59KB4.22KB▼ 50.83%