83% wpcopyrights

Code Review | WPCopyRights网站防复制插件

WordPress plugin WPCopyRights网站防复制插件 scored 83% from 54 tests.

About plugin

  • Plugin page: wpcopyrights
  • Plugin version: 5.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 3, 2020
  • Latest release: May 13, 2023
  • Number of updates: 16
  • Update frequency: every 69.3 days
  • Top authors: laobuluo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 8,291 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.05ms] Passed 4 tests

A check of server-side resources used by WPCopyRights网站防复制插件
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.63 ▲0.18
Dashboard /wp-admin3.31 ▲0.0146.23 ▼4.29
Posts /wp-admin/edit.php3.36 ▲0.0150.31 ▲5.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.90 ▼2.49
Media Library /wp-admin/upload.php3.24 ▲0.0136.51 ▲2.42
WPCopyRights设置 /wp-admin/tools.php?page=wpcopyrights/index.php3.2031.24

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WPCopyRights网站防复制插件
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.26 ▼1.154.52 ▲2.5443.07 ▼1.75
Dashboard /wp-admin2,213 ▲255.86 ▲0.00108.92 ▲3.8744.38 ▲4.44
Posts /wp-admin/edit.php2,093 ▲222.02 ▼0.0140.60 ▲4.2140.75 ▲3.60
Add New Post /wp-admin/post-new.php1,537 ▲2323.31 ▲5.71580.26 ▼58.4451.40 ▼6.29
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0198.09 ▼8.1545.29 ▼0.32
WPCopyRights设置 /wp-admin/tools.php?page=wpcopyrights/index.php1,3971.8040.70150.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wpcopyrights/index.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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:
  • Tags: No tags were detected
  • Screenshots: A description for screenshot #2 is required in wpcopyrights/assets to your readme.txt
You can look at the official readme.txt

wpcopyrights/index.php 92% from 13 tests

The principal PHP file in "WPCopyRights网站防复制插件" v. 5.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpcopyrights.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
Good job! No executable or dangerous file extensions detected766 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP25610556
SVG13563195
JavaScript6059
CSS6046

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.80
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
layui/images/footer_logo.png24.74KB0.87KB▼ 96.48%
layui/css/modules/layer/default/icon.png11.22KB4.36KB▼ 61.19%
layui/css/modules/layer/default/icon-ext.png5.77KB2.91KB▼ 49.62%
layui/images/qrcode.png72.54KB12.37KB▼ 82.94%
layui/images/logo.png24.44KB0.95KB▼ 96.10%