84% wp-copyright-protection

Code Review | WP-Copyright-Protection

WordPress plugin WP-Copyright-Protection scored84%from 54 tests.

About plugin

  • Plugin page: wp-copyright-prot...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 22, 2011
  • Latest release: Mar 16, 2020
  • Number of updates: 22
  • Update frequency: every 150.5 days
  • Top authors: dave.ligthart (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

9,000+ active /161,789 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.35ms] Passed 4 tests

An overview of server-side resources used by WP-Copyright-Protection
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.73 ▲4.88
Dashboard /wp-admin3.32 ▼0.0345.61 ▼16.81
Posts /wp-admin/edit.php3.37 ▲0.0148.17 ▼0.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.13 ▼20.87
Media Library /wp-admin/upload.php3.24 ▲0.0136.13 ▲0.86
WP-Copyright-Protection /wp-admin/options-general.php?page=wpcp_options3.2132.95

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-Copyright-Protection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10613.31 ▼1.052.27 ▲0.6741.43 ▲2.66
Dashboard /wp-admin2,213 ▲255.86 ▼0.19105.42 ▼14.1340.97 ▼6.41
Posts /wp-admin/edit.php2,096 ▲42.00 ▲0.0239.94 ▲2.2134.15 ▲0.47
Add New Post /wp-admin/post-new.php1,536 ▼623.25 ▲4.92681.68 ▲28.8254.00 ▼1.32
Media Library /wp-admin/upload.php1,386 ▲14.18 ▼0.0295.56 ▼7.8445.38 ▲2.16
WP-Copyright-Protection /wp-admin/options-general.php?page=wpcp_options8292.0627.5227.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-copyright-protection/settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-copyright-protection/wp-copyright-protection.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: protection, copy, protect, copyright, image protection...

wp-copyright-protection/wp-copyright-protection.php Passed 13 tests

The main PHP file in "WP-Copyright-Protection" ver. 1.7 adds more information about the plugin and also serves as the entry point for this plugin
114 characters long description:
A simple way to add copyright protection to your website. Disables text copy, image copy and breaks out of iframe.

Code Analysis Passed 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
There were no executable files found in this plugin180 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24970157
CSS16023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
thumbsup.png1.46KB1.46KB0.00%
assets/image/thumbsup.png1.46KB1.46KB0.00%
assets/icon-256x256.png22.93KB9.19KB▼ 59.94%
assets/icon-128.png8.79KB3.88KB▼ 55.88%
assets/icon-128x128.png8.79KB3.88KB▼ 55.88%