84% wp-widget-cloner

Code Review | WP Widget Cloner

WordPress plugin WP Widget Cloner scored 84% from 54 tests.

About plugin

  • Plugin page: wp-widget-cloner
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2017
  • Latest release: Mar 10, 2018
  • Number of updates: 5
  • Update frequency: every 20.2 days
  • Top authors: marifamir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 638 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.04MB] [CPU: ▼1.77ms] Passed 4 tests

This is a short check of server-side resources used by WP Widget Cloner
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.40 ▲0.89
Dashboard /wp-admin3.34 ▲0.0349.12 ▲1.64
Posts /wp-admin/edit.php3.45 ▲0.0947.17 ▲4.47
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.51 ▼10.66
Media Library /wp-admin/upload.php3.26 ▲0.0335.08 ▲1.04

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Widget Cloner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.31 ▼1.084.49 ▲2.8045.13 ▼3.75
Dashboard /wp-admin2,213 ▲224.87 ▼0.0497.90 ▼3.7139.25 ▼10.69
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0435.34 ▲1.4032.70 ▼0.89
Add New Post /wp-admin/post-new.php1,518 ▼2423.34 ▲4.98628.40 ▼23.6251.12 ▼16.36
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.00103.64 ▼0.4743.91 ▼3.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 return non-empty strings:
    • > /wp-content/plugins/wp-widget-cloner/admin/partials/wp-widget-cloner-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The 'Clone it' button can be found at the bottom of each widget in between 'Delete' and 'Close'.) image missing
The official readme.txt might help

wp-widget-cloner/wp-widget-cloner.php Passed 13 tests

This is the main PHP file of "WP Widget Cloner" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
95 characters long description:
WP Widget cloner makes a copy of the widget that you can then drag and drop to another sidebar.

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
Good job! No executable or dangerous file extensions detected210 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP877350127
JavaScript121563
Markdown110020
CSS1040

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin