83% wp-copy-content

Code Review | WordPress Copy Content

WordPress plugin WordPress Copy Content scored83%from 54 tests.

About plugin

  • Plugin page: wp-copy-content
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Dec 23, 2018
  • Number of updates: 6
  • Update frequency: every 71.0 days
  • Top authors: bhargavbhandari90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /942 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.01MB] [CPU: ▼5.66ms] Passed 4 tests

A check of server-side resources used by WordPress Copy Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.57 ▼4.60
Dashboard /wp-admin3.31 ▲0.0142.44 ▼4.49
Posts /wp-admin/edit.php3.36 ▲0.0145.95 ▼1.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.69 ▼12.39
Media Library /wp-admin/upload.php3.24 ▲0.0136.52 ▲1.50

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Copy Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4514.42 ▲0.041.64 ▼0.3040.54 ▼1.55
Dashboard /wp-admin2,208 ▲174.94 ▲0.07115.46 ▲9.2241.91 ▼0.80
Posts /wp-admin/edit.php2,091 ▲22.03 ▲0.0240.62 ▼3.0135.22 ▼0.02
Add New Post /wp-admin/post-new.php6,472 ▲4,93720.29 ▼2.94863.20 ▲184.5455.16 ▼2.44
Media Library /wp-admin/upload.php1,381 ▼74.25 ▲0.0796.10 ▼12.1143.64 ▼2.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-copy-content/index.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Search the post/page by it's title screenshot-1.jpg.) image missing
Please take inspiration from this readme.txt

wp-copy-content/index.php 85% from 13 tests

The main PHP script in "WordPress Copy Content" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-copy-content.php" instead of "index.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected231 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21924123
PHP24591108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin