83% smart-copy-protect

Code Review | Smart Copy Protect

WordPress plugin Smart Copy Protect scored 83% from 54 tests.

About plugin

  • Plugin page: smart-copy-protect
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-5.0
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Jun 13, 2019
  • Number of updates: 11
  • Update frequency: every 81.1 days
  • Top authors: infodesignbd (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 5,796 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Smart Copy Protect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.29 ▲0.12
Dashboard /wp-admin3.31 ▲0.0146.27 ▼2.31
Posts /wp-admin/edit.php3.36 ▲0.0046.81 ▼2.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.95 ▼22.81
Media Library /wp-admin/upload.php3.23 ▲0.0036.75 ▲4.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Smart Copy Protect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8013.23 ▼1.045.28 ▲3.2237.34 ▼3.13
Dashboard /wp-admin2,203 ▲184.86 ▼0.02116.23 ▲13.6342.20 ▼2.19
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0139.23 ▼2.0333.76 ▼3.01
Add New Post /wp-admin/post-new.php1,532 ▲14023.43 ▲5.14651.24 ▼52.0663.68 ▲6.81
Media Library /wp-admin/upload.php1,385 ▼34.19 ▲0.0097.06 ▼18.8043.28 ▼2.85

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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 | 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-copy-protect/smartcopy-protect.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Contributors: Contributors not specified
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

smart-copy-protect/smartcopy-protect.php 85% from 13 tests

The main PHP file in "Smart Copy Protect" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("smart-copy-protect.php" instead of "smartcopy-protect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected69 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2221769

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
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
PNG images were not found in this plugin