78% omnify-widget

Code Review | Omnify - The Best Scheduling Widgets for WordPress

WordPress plugin Omnify - The Best Scheduling Widgets for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: omnify-widget
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: May 6, 2017
  • Latest release: Feb 28, 2018
  • Number of updates: 7
  • Update frequency: every 42.6 days
  • Top authors: omnify1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,267 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.43ms] Passed 4 tests

An overview of server-side resources used by Omnify - The Best Scheduling Widgets for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.80 ▲1.93
Dashboard /wp-admin3.44 ▲0.1453.40 ▲1.39
Posts /wp-admin/edit.php3.56 ▲0.2048.13 ▲1.67
Add New Post /wp-admin/post-new.php6.02 ▲0.1482.62 ▼6.70
Media Library /wp-admin/upload.php3.37 ▲0.1437.97 ▲3.12
Omnify Widget /wp-admin/options-general.php?page=omnify-widget3.3433.32

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Omnify - The Best Scheduling Widgets for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.43 ▼0.962.18 ▲0.4541.23 ▼3.41
Dashboard /wp-admin2,222 ▲404.99 ▼0.0496.66 ▼19.0237.25 ▼5.69
Posts /wp-admin/edit.php2,113 ▲272.27 ▲0.2837.62 ▲3.2247.74 ▲13.23
Add New Post /wp-admin/post-new.php1,536 ▲1618.33 ▼4.72613.28 ▲0.4236.12 ▼15.61
Media Library /wp-admin/upload.php1,404 ▲134.45 ▲0.1794.67 ▼2.4743.17 ▼0.51
Omnify Widget /wp-admin/options-general.php?page=omnify-widget8692.3947.3843.51

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-setup-token.php:23
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-update-iframe.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-update-iframe.php on line 3
    • > PHP Notice
      Undefined index: widget in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-update-button.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-update-iframe.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-index.php:16
    • > PHP Notice
      Undefined variable: widget in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-update-iframe.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-shortcodes-data.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-update-iframe.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/omnify-widget/admin/partials/omnify-widget-create-button.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=omnify-widget
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris&ver=6.3.1 1:28609 "jQuery.Deferred exception: token is not defined" "ReferenceError: token is not defined\n at syncIframeWidgets (/wp-content/plugins/omnify-widget/admin/js/omnify-widget-admin.js?ver=2.0.3:749:99)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/omnify-widget/admin/js/omnify-widget-admin.js?ver=2.0.3:54:13)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=omnify-widget
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris&ver=6.3.1 1:28721 Uncaught ReferenceError: token is not defined
    • > GET request to /wp-admin/options-general.php?page=omnify-widget
    • > Javascript (severe) in unknown
    /wp-content/plugins/omnify-widget/admin/js/omnify-widget-admin.js?ver=2.0.3 800:64 Uncaught ReferenceError: token is not defined

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (25 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

omnify-widget/omnify-widget.php Passed 13 tests

The principal PHP file in "Omnify - The Best Scheduling Widgets for WordPress" v. 2.0.3 is loaded by WordPress automatically on each request
112 characters long description:
Easily embed Omnify buttons and iframes onto your existing WordPress website and start selling right from there.

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 detected15,937 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,5783314,143
PHP191666011,200
JavaScript4115170594

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.71
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods24.17%
▷ Public methods4287.50%
▷ Protected methods00.00%
▷ Private methods612.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.32MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png81.95KB31.02KB▼ 62.14%
admin/partials/images/omnifylogo.png11.64KB4.50KB▼ 61.31%
assets/screenshot-2.png35.47KB14.49KB▼ 59.15%
admin/partials/images/generate-token.png120.89KB36.11KB▼ 70.13%
admin/partials/images/copy-token.png50.47KB13.02KB▼ 74.19%