84% wp-copy-protect

Code Review | WP Copy Protect

WordPress plugin WP Copy Protect scored84%from 54 tests.

About plugin

  • Plugin page: wp-copy-protect
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Jul 11, 2014
  • Latest release: Mar 18, 2019
  • Number of updates: 10
  • Update frequency: every 171.1 days
  • Top authors: areafin5 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /35,657 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by WP Copy Protect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.92 ▼5.55
Dashboard /wp-admin3.31 ▲0.0144.76 ▲0.09
Posts /wp-admin/edit.php3.36 ▲0.0045.46 ▼6.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.25 ▼15.02
Media Library /wp-admin/upload.php3.24 ▲0.0035.80 ▲0.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Copy Protect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.23 ▼1.191.88 ▲0.2442.95 ▲2.49
Dashboard /wp-admin2,206 ▲184.85 ▲0.01110.08 ▲3.7337.61 ▼4.28
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0434.56 ▼7.5333.00 ▼3.64
Add New Post /wp-admin/post-new.php1,380 ▼14018.86 ▼4.27560.08 ▼123.8453.12 ▼0.93
Media Library /wp-admin/upload.php1,388 ▲64.19 ▲0.0398.63 ▼6.4843.47 ▼2.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-copy-protect/lib/wp-copy-protect.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-copy-protect/lib/wp-copy-protect.php:1

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 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Copy protected WordPress Blog/ website:: Just active and enjoy.) image missing
The official readme.txt might help

wp-copy-protect/index.php 92% from 13 tests

"WP Copy Protect" version 1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-copy-protect.php" instead of "index.php")

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
No dangerous file extensions were detected3 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2193

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin