10% okay-toolkit

Code Review | Okay Toolkit

WordPress plugin Okay Toolkit scored 10% from 54 tests.

About plugin

  • Plugin page: okay-toolkit
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-3.8
  • WordPress version: 6.3.1
  • First release: Nov 15, 2012
  • Latest release: Jan 15, 2014
  • Number of updates: 251
  • Update frequency: every 1.7 days
  • Top authors: okaythemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 12,289 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/okay-toolkit/includes/widgets/twitter/lib/twitter-api-core.php+62
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.86MB] [CPU: ▼50.32ms] Passed 4 tests

An overview of server-side resources used by Okay Toolkit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.366.68 ▼33.53
Dashboard /wp-admin2.15 ▼1.158.22 ▼41.36
Posts /wp-admin/edit.php2.15 ▼1.207.47 ▼41.76
Add New Post /wp-admin/post-new.php2.15 ▼3.737.69 ▼84.64
Media Library /wp-admin/upload.php2.15 ▼1.077.78 ▼26.54
Okay Toolkit /wp-admin/options-general.php?page=okay-toolkit/okay-toolkit.php2.157.57
Twitter API /wp-admin/options-general.php?page=twitter-api-admin2.159.11

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 56 new files
Database: no new tables, 10 new options
New WordPress options
widget_latest_tweets_widget
can_compress_scripts
db_upgraded
widget_ok-icons-widget
widget_ok-flickr-widget
widget_ok-dribbble
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Okay Toolkit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲12013.51 ▼0.921.73 ▼0.3138.20 ▼13.82
Dashboard /wp-admin2,252 ▲645.95 ▲0.09106.84 ▼8.3339.78 ▼3.04
Posts /wp-admin/edit.php2,141 ▲552.38 ▲0.3643.11 ▲7.0733.80 ▼0.82
Add New Post /wp-admin/post-new.php1,529 ▼417.81 ▼5.28618.58 ▼53.9455.96 ▲0.56
Media Library /wp-admin/upload.php1,434 ▲494.36 ▲0.16100.33 ▼0.2541.69 ▼1.18
Okay Toolkit /wp-admin/options-general.php?page=okay-toolkit/okay-toolkit.php1,0482.0541.6940.43
Twitter API /wp-admin/options-general.php?page=twitter-api-admin9542.2831.5629.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/okay-toolkit/includes/widgets/twitter/lib/twitter-api-core.php+62
    Array and string offset access syntax with curly braces is deprecated
  • This plugin does not fully uninstall, leaving 10 options in the database
    • db_upgraded
    • widget_ok-flickr-widget
    • widget_theysaidso_widget
    • widget_ok-dribbble
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_ok-icons-widget
    • widget_latest_tweets_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > Deprecated in wp-content/plugins/okay-toolkit/includes/widgets/twitter/lib/twitter-api-core.php+80
    Array and string offset access syntax with curly braces is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > Deprecated in wp-content/plugins/okay-toolkit/includes/widgets/dribbble/dribbble.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; okay_dribbble_widget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > Deprecated in wp-content/plugins/okay-toolkit/includes/widgets/flickr/flickr.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; okay_flickr_widget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > Deprecated in wp-content/plugins/okay-toolkit/includes/widgets/icons/icons.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; okay_icons_widget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in okay_dribbble_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in okay_flickr_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in okay_icons_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=okay-toolkit/okay-toolkit.php
    • > Notice in wp-content/plugins/okay-toolkit/okay-toolkit.php+170
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/okay-toolkit/okay-toolkit.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/okay-toolkit/includes/lib/metabox/init.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/okay-toolkit/includes/widgets/twitter/latest-tweets.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/okay-toolkit/includes/gallery/gallery.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/okay-toolkit/includes/widgets/twitter/lib/twitter-api.php:137
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/okay-toolkit/includes/lib/metabox/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/okay-toolkit/includes/widgets/dribbble/dribbble.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/okay-toolkit/includes/widgets/icons/icons.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/okay-toolkit/includes/widgets/twitter/lib/twitter-api-admin.php:213
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/okay-toolkit/includes/widgets/flickr/flickr.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (The Okay Toolkit widget will appear in your list of available widgets.), #2 (A view of the available settings for the Toolkit.), #3 (Widgets that will appear in your Widgets area once activated.), #4 (Retina social icons widget active in a footer.)
Please take inspiration from this readme.txt

okay-toolkit/okay-toolkit.php Passed 13 tests

Analyzing the main PHP file in "Okay Toolkit" version 2.3
60 characters long description:
Various social widgets and elements for your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin4,162 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP125355002,234
CSS690701,007
PO File3239242600
JavaScript43169170
Markdown2300113
SVG10024
Bourne Shell15414

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity22.17
▷ Minimum class complexity1.00
▷ Maximum class complexity154.00
Average method complexity6.18
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods49
▷ Static methods510.20%
▷ Public methods4591.84%
▷ Protected methods00.00%
▷ Private methods48.16%
Functions61
▷ Named functions61100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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
18 PNG files occupy 0.14MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/lib/metabox/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
includes/lib/metabox/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
includes/lib/metabox/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
includes/lib/metabox/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
screenshot-3.png30.16KB11.14KB▼ 63.07%