78% unify

Code Review | Unify

WordPress plugin Unify scored78%from 54 tests.

About plugin

  • Plugin page: unify
  • Plugin version: 3.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2018
  • Latest release: Mar 31, 2023
  • Number of updates: 144
  • Update frequency: every 10.9 days
  • Top authors: codeclouds (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,543 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.00MB] [CPU: ▼6.82ms] Passed 4 tests

A check of server-side resources used by Unify
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.96 ▲5.33
Dashboard /wp-admin3.31 ▼0.0348.18 ▼14.09
Posts /wp-admin/edit.php3.36 ▲0.0146.23 ▲2.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.23 ▼13.10
Media Library /wp-admin/upload.php3.23 ▲0.0134.11 ▼2.71

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 154 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
unify_plugin_activation_date
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Unify
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.23 ▼1.161.71 ▲0.1342.72 ▼0.04
Dashboard /wp-admin2,211 ▲235.78 ▼0.10101.68 ▼2.7439.04 ▼5.14
Posts /wp-admin/edit.php2,096 ▲71.97 ▼0.0735.74 ▼0.3436.84 ▼0.47
Add New Post /wp-admin/post-new.php1,528 ▲422.87 ▼0.25667.24 ▲1.8460.98 ▼7.58
Media Library /wp-admin/upload.php1,390 ▼14.25 ▲0.04100.00 ▲1.9543.61 ▲1.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • unify_plugin_activation_date
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/unify/Lib/_SelfLoader-1.0/bin/loader.php
    • > /wp-content/plugins/unify/Templates/Mail/request-unfiy-pro-user.php
    • > /wp-content/plugins/unify/Templates/footer.php
    • > /wp-content/plugins/unify/Templates/Mail/request-unfiy-pro.php
    • > /wp-content/plugins/unify/Templates/cc_payment.php
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/unify/Templates/Tools/shipping-mapping.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CodeClouds\\Unify\\Service\otice' not found in wp-content/plugins/unify/Templates/pro-dashboard.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/unify/Templates/about.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/unify/Templates/Pagination/pagination-template.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CodeClouds\\Unify\\Service\otice' not found in wp-content/plugins/unify/Templates/upgrade-to-pro.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/unify/Templates/Tools/import-export.php:8
    • > PHP Notice
      Undefined variable: prev_dis in wp-content/plugins/unify/Templates/Pagination/pagination-template.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/unify/Models/Unify_Payment.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/unify/Templates/pro-settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/unify/Templates/paypal-checkout-button.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
Please take inspiration from this readme.txt

unify/unify.php 92% from 13 tests

The main PHP file in "Unify" ver. 3.4.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected17,826 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP891,4181,3118,213
CSS49511506,110
JavaScript135912973,159
JSON930266
SVG100259
Markdown111019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity22.63
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes12.27%
Methods268
▷ Static methods16160.07%
▷ Public methods20676.87%
▷ Protected methods93.36%
▷ Private methods5319.78%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
23 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/paypal-white.png12.79KB6.84KB▼ 46.51%
assets/images/icon-prodmap.png1.26KB0.94KB▼ 25.31%
assets/images/paypal-3.png3.02KB1.54KB▼ 48.88%
assets/images/unify-white.png1.27KB0.62KB▼ 51.43%
assets/images/paypal-blue.png14.25KB7.92KB▼ 44.47%