77% wp-content-copy-protection

Code Review | WP Content Copy Protection

WordPress plugin WP Content Copy Protection scored77%from 54 tests.

About plugin

  • Plugin page: wp-content-copy-p...
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2012
  • Latest release: Jun 27, 2023
  • Number of updates: 114
  • Update frequency: every 34.3 days
  • Top authors: RSPublishing (78.07%)tychesoftwares (9.65%)ashokrane (7.89%)Dhruvin (7.02%)

Code review

54 tests

User reviews

163 reviews

Install metrics

20,000+ active /653,429 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.04ms] Passed 4 tests

Analyzing server-side resources used by WP Content Copy Protection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.77 ▼2.87
Dashboard /wp-admin3.33 ▲0.0244.41 ▼5.26
Posts /wp-admin/edit.php3.38 ▲0.0245.22 ▼1.57
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.39 ▼22.47
Media Library /wp-admin/upload.php3.25 ▲0.0235.56 ▲1.16
WP Content Copy Protection /wp-admin/options-general.php?page=wpccp3.2531.99

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Content Copy Protection
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲20213.96 ▼0.458.91 ▲7.0941.44 ▲1.78
Dashboard /wp-admin2,213 ▲215.03 ▲0.11106.55 ▼4.7740.24 ▼1.65
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0639.08 ▼1.9637.20 ▲2.65
Add New Post /wp-admin/post-new.php1,527 ▲123.23 ▲0.02682.09 ▲59.8148.56 ▼6.08
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.0096.22 ▼5.0641.93 ▼4.69
WP Content Copy Protection /wp-admin/options-general.php?page=wpccp1,3202.3846.1431.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-content-copy-protection/index.php
    • > /wp-content/plugins/wp-content-copy-protection/includes/views/no-script.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-content-copy-protection/includes/views/settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-content-copy-protection/includes/views/upgrade.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 80% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-content-copy-protection/wpccpl.php 62% from 13 tests

Analyzing the main PHP file in "WP Content Copy Protection" version 2.0.6
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 206 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-content-copy-protection.php" instead of "wpccpl.php")
  • Requires at least: Required version must match the one declared in readme.txt ("3.0" instead of "3.0.1")
  • Git Repository: An alternative Git repository was detected
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin6,421 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,2023564,711
PHP16187603928
CSS6690504
SVG290103
JSON40093
Markdown135044
XML16824
YAML13014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity20.17
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods63
▷ Static methods3657.14%
▷ Public methods6095.24%
▷ Protected methods00.00%
▷ Private methods34.76%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/taison-mascot.png95.91KB22.45KB▼ 76.59%