83% use-widgets-anywhere

Code Review | Use Widgets Anywhere!

WordPress plugin Use Widgets Anywhere! scored83%from 54 tests.

About plugin

  • Plugin page: use-widgets-anywhere
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8
  • WordPress version: 6.3.1
  • First release: Aug 31, 2021
  • Latest release: Sep 1, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: crplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.97ms] Passed 4 tests

An overview of server-side resources used by Use Widgets Anywhere!
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.04 ▼3.69
Dashboard /wp-admin3.34 ▲0.0359.41 ▲5.13
Posts /wp-admin/edit.php3.45 ▲0.0946.69 ▼3.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.61 ▲1.40
Media Library /wp-admin/upload.php3.26 ▲0.0335.28 ▲1.94

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Use Widgets Anywhere!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.161.66 ▼0.5144.36 ▼4.60
Dashboard /wp-admin2,209 ▲245.85 ▲0.0199.58 ▼18.8239.26 ▼5.86
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0039.19 ▲3.0936.28 ▼0.43
Add New Post /wp-admin/post-new.php1,520 ▲123.47 ▲0.29646.57 ▼48.2459.10 ▲3.44
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.08104.19 ▲6.8746.29 ▲4.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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 | 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'CRPlugins\\WidgetsAnywhere\\Helper\otices_Trait' not found in wp-content/plugins/use-widgets-anywhere/includes/helper/class-helper.php on line 13

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 Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: widgets

use-widgets-anywhere/class-widgets-anywhere.php 77% from 13 tests

The main PHP script in "Use Widgets Anywhere!" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("use-widgets-anywhere.php" instead of "class-widgets-anywhere.php")
  • Domain Path: The domain path folder was not found ("/i18n/languages/")
  • 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 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin142 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP334107142

PHP code Passed 2 tests

This is a very shot 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.27
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods12100.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin