78% unyson

Code Review | Unyson

WordPress plugin Unyson scored 78% from 54 tests.

About plugin

  • Plugin page: unyson
  • Plugin version: 2.7.26
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.8.1
  • First release: Nov 28, 2014
  • Latest release: Feb 18, 2022
  • Number of updates: 287
  • Update frequency: every 9.2 days
  • Top authors: Unyson (99.65%)

Code review

54 tests

User reviews

88 reviews

Install metrics

300,000+ active / 2,805,321 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼145.88ms] Passed 4 tests

This is a short check of server-side resources used by Unyson
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.13 ▲0.291,373.36 ▲1,344.34
Dashboard /wp-admin3.43 ▲0.3638.44 ▼3.04
Posts /wp-admin/edit.php3.49 ▲0.3839.29 ▲6.48
Add New Post /wp-admin/post-new.php5.79 ▲0.3575.35 ▼590.62
Media Library /wp-admin/upload.php3.37 ▲0.3733.57 ▲3.65
New /wp-admin/admin.php?page=fw-new3.3926.45
Unyson /wp-admin/admin.php?page=fw-extensions3.5434.40

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 416 new files
Database: no new tables, 1 new option
New WordPress options
fw_active_extensions

Browser metrics Passed 4 tests

This is an overview of browser requirements for Unyson
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,748 ▲14715.97 ▲0.238.51 ▲2.9678.65 ▼0.45
Dashboard /wp-admin3,013 ▲1186.18 ▼0.02117.19 ▼15.01169.18 ▼11.42
Posts /wp-admin/edit.php2,814 ▲713.25 ▲0.0165.37 ▲0.27143.77 ▲1.76
Add New Post /wp-admin/post-new.php2,393 ▼1,34815.90 ▼2.79445.53 ▼11.98178.41 ▼10.41
Media Library /wp-admin/upload.php1,824 ▲725.60 ▲0.12144.08 ▼10.01187.18 ▼7.20
New /wp-admin/admin.php?page=fw-new1,5177.04257.97271.27
Unyson /wp-admin/admin.php?page=fw-extensions2,5585.1898.38151.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 1 option
    • fw_active_extensions

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 140× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/unyson/framework/helpers/meta.php
    • > /wp-content/plugins/unyson/framework/helpers/exceptions/class-fw-form-invalid-submission-exception.php
    • > /wp-content/plugins/unyson/framework/helpers/class-fw-wp-option.php
    • > /wp-content/plugins/unyson/framework/includes/option-storage/class--fw-option-storage-type-register.php
    • > /wp-content/plugins/unyson/framework/includes/container-types/box/class-fw-container-type-box.php
    • > /wp-content/plugins/unyson/framework/includes/option-types/background-image/view.php
    • > /wp-content/plugins/unyson/framework/includes/option-storage/type/class-fw-option-storage-type-term-meta.php
    • > /wp-content/plugins/unyson/framework/includes/container-types/tab/class-fw-container-type-tab.php
    • > /wp-content/plugins/unyson/framework/helpers/type/class-fw-type.php
    • > /wp-content/plugins/unyson/framework/includes/option-types/popup/views/view.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fw() in wp-content/plugins/unyson/framework/includes/option-types/icon-v2/views/templates.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/unyson/framework/views/about.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fw() in wp-content/plugins/unyson/framework/views/backend-option-design-empty.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #6 (Adding a new slider will let you select the Type, Population Method.), #7 (SEO settings at their finger tips without installing further plugins.)
You can take inspiration from this readme.txt

unyson/unyson.php 92% from 13 tests

"Unyson" version 2.7.26's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected85,394 lines of code in 349 files:
LanguageFilesBlank linesComment linesLines of code
PHP1525,0157,10822,764
PO File68,01413,04316,788
JavaScript1262,8312,84516,699
CSS551,26238112,405
HTML2754211,189
SVG6015,444
Markdown2310105

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity18.89
▷ Minimum class complexity1.00
▷ Maximum class complexity471.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes128
▷ Abstract classes118.59%
▷ Concrete classes11791.41%
▷ Final classes86.84%
Methods1,063
▷ Static methods918.56%
▷ Public methods56553.15%
▷ Protected methods37435.18%
▷ Private methods12411.67%
Functions125
▷ Named functions125100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
8 PNG files occupy 0.46MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
framework/includes/option-types/icon-v2/static/img/transparent_bg.png17.98KB0.09KB▼ 99.50%
framework/static/img/logo-100.png4.59KB2.91KB▼ 36.65%
framework/includes/option-types/icon-v2/static/img/no-image.png3.61KB0.46KB▼ 87.14%
framework/includes/option-types/icon-v2/static/img/sauron.png38.25KB9.80KB▼ 74.38%
framework/core/components/extensions/manager/static/img/disabled-bg.png0.90KB0.10KB▼ 88.44%