10% array-toolkit

Code Review | Array Toolkit

WordPress plugin Array Toolkit scored10%from 54 tests.

About plugin

  • Plugin page: array-toolkit
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8.3
  • WordPress version: 6.3.1
  • First release: Mar 28, 2014
  • Latest release: Nov 19, 2017
  • Number of updates: 126
  • Update frequency: every 10.6 days
  • Top authors: okaythemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /14,536 total downloads

Benchmarks

Plugin footprint 58% 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
  • This plugin did not install gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+312
    Non-static method Array_Toolkit_Install::deactivate_okay_toolkit() should not be called statically

Server metrics [RAM: ▼11.60MB] [CPU: ▼2,408,644.14ms] Passed 4 tests

A check of server-side resources used by Array Toolkit
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▼46.6141.49 ▼9,634,558.69
Dashboard /wp-admin50.17 ▲46.789,643,503.47 ▲9,643,431.66
Posts /wp-admin/edit.php3.51 ▲0.1150.89 ▲0.32
Add New Post /wp-admin/post-new.php5.98 ▲0.0590.76 ▼15.48
Media Library /wp-admin/upload.php3.32 ▲0.0542.28 ▼2.70

Server storage [IO: ▲0.28MB] [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: 50 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
array_toolkit_version

Browser metrics Passed 4 tests

Checking browser requirements for Array Toolkit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.24 ▼0.482.04 ▲0.4045.78 ▲5.65
Dashboard /wp-admin2,191 ▲175.61 ▲0.0588.18 ▼6.1239.39 ▼3.80
Posts /wp-admin/edit.php2,102 ▲22.00 ▲0.0136.32 ▼0.4336.79 ▲0.52
Add New Post /wp-admin/post-new.php1,528 ▲123.78 ▲0.58669.39 ▲52.5464.37 ▲8.10
Media Library /wp-admin/upload.php1,405 ▲54.29 ▲0.18110.74 ▲8.4849.03 ▲0.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/edd/demo.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/widgets/icons/icons.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/array-toolkit/includes/lib/metabox/init.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/widgets/flickr/flickr.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/testimonials/taxonomies.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/widgets/dribbble/dribbble.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/array-toolkit/includes/admin/admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/sharing/sharing.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/testimonials/post-types.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/array-toolkit/includes/post-types.php:154

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Array 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

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

The main PHP script in "Array Toolkit" version 1.1.8 is automatically included on every request by WordPress
124 characters long description:
The Array Toolkit extends functionality to Array Themes, providing portfolio items, testimonials, custom metaboxes and more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,633 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP198971,2132,405
CSS710848912
JavaScript56894288
SVG10028

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.93
▷ Minimum class complexity3.00
▷ Maximum class complexity161.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods151
▷ Static methods10267.55%
▷ Public methods14394.70%
▷ Protected methods00.00%
▷ Private methods85.30%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/lib/metabox/images/ui-icons_454545_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-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/lib/metabox/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/lib/metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%