67% wordpress-prevent-copy-paste-plugin

Code Review | wordpress prevent copy paste plugin (lite)

WordPress plugin wordpress prevent copy paste plugin (lite) scored67%from 54 tests.

About plugin

  • Plugin page: wordpress-prevent...
  • Plugin version: 1.4.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.3
  • WordPress version: 6.3.1
  • First release: Jun 8, 2012
  • Latest release: Aug 8, 2015
  • Number of updates: 65
  • Update frequency: every 17.8 days
  • Top authors: ashrafweb (96.92%)wp-buy (4.62%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /30,502 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.92MB] [CPU: ▼37.62ms] Passed 4 tests

Server-side resources used by wordpress prevent copy paste plugin (lite)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0525.48 ▼15.83
Dashboard /wp-admin3.02 ▼0.2825.52 ▼25.74
Posts /wp-admin/edit.php3.03 ▼0.3325.06 ▼29.40
Add New Post /wp-admin/post-new.php3.02 ▼2.8624.12 ▼79.50
Media Library /wp-admin/upload.php3.02 ▼0.2024.86 ▼11.40
Wordpress Prevent Copy Paste /wp-admin/options-general.php?page=wpcpoptions3.0327.77

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for wordpress prevent copy paste plugin (lite)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.14 ▼0.423.27 ▲1.2643.42 ▼5.34
Dashboard /wp-admin2,199 ▲255.63 ▲0.0691.17 ▼12.3643.88 ▲0.82
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0140.36 ▼12.0936.47 ▼26.71
Add New Post /wp-admin/post-new.php1,529 ▲123.21 ▼0.08662.91 ▼2.6358.99 ▲1.83
Media Library /wp-admin/upload.php1,404 ▲44.12 ▲0.01103.12 ▼17.8447.92 ▼0.36
Wordpress Prevent Copy Paste /wp-admin/options-general.php?page=wpcpoptions9551.9923.3328.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpcpoptions
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=wpcpoptions
    • > Notice in wp-content/plugins/wordpress-prevent-copy-paste-plugin/admin-core.php+4
    Undefined index: action

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wordpress-prevent-copy-paste-plugin/the_globals.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wordpress-prevent-copy-paste-plugin/the_globals.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wordpress-prevent-copy-paste-plugin/the_globals.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 (wordpress prevent copy paste plugin) image required
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

wordpress-prevent-copy-paste-plugin/preventer-index.php 85% from 13 tests

The primary PHP file in "wordpress prevent copy paste plugin (lite)" version 1.4.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wordpress-prevent-copy-paste-plugin.php" instead of "preventer-index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 164 characters long)

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
There were no executable files found in this plugin305 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41032305

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png16.67KB8.03KB▼ 51.83%