84% wp-copyright

Code Review | WP Copyright

WordPress plugin WP Copyright scored84%from 54 tests.

About plugin

  • Plugin page: wp-copyright
  • Plugin version: 2.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Aug 31, 2017
  • Latest release: Jan 23, 2019
  • Number of updates: 33
  • Update frequency: every 15.5 days
  • Top authors: zitrusblau (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,417 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.12ms] Passed 4 tests

This is a short check of server-side resources used by WP Copyright
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.99 ▼3.77
Dashboard /wp-admin3.44 ▲0.1443.37 ▼7.11
Posts /wp-admin/edit.php3.56 ▲0.2047.85 ▲4.12
Add New Post /wp-admin/post-new.php6.02 ▲0.1483.40 ▼18.52
Media Library /wp-admin/upload.php3.37 ▲0.1434.90 ▲0.94
WP Copyright /wp-admin/options-general.php?page=zb-wp-copyright-admin3.3326.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
zb_wp_copyright_options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WP Copyright: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.24 ▼1.401.56 ▼0.3542.46 ▼1.67
Dashboard /wp-admin2,213 ▲255.88 ▼0.18109.11 ▼6.7341.32 ▼3.45
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0139.26 ▲2.5541.24 ▲7.84
Add New Post /wp-admin/post-new.php1,553 ▲3417.97 ▼4.95625.49 ▼29.8165.31 ▲17.01
Media Library /wp-admin/upload.php1,399 ▲84.21 ▲0.0294.70 ▼7.0941.10 ▼4.67
WP Copyright /wp-admin/options-general.php?page=zb-wp-copyright-admin8392.0227.5733.39

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
    • can_compress_scripts
    • widget_recent-comments
    • 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 shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just 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 register_activation_hook() in wp-content/plugins/wp-copyright/main.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can look at the official readme.txt

wp-copyright/main.php 92% from 13 tests

Analyzing the main PHP file in "WP Copyright" version 2.0.4
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-copyright.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin659 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1197251616
PO File18843

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions39
▷ Named functions1538.46%
▷ Anonymous functions2461.54%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin