74% woo-icon-stock

Code Review | Woo Icon Stock

WordPress plugin Woo Icon Stock scored74%from 54 tests.

About plugin

  • Plugin page: woo-icon-stock
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.9
  • WordPress version: 6.3.1
  • First release: Feb 28, 2014
  • Latest release: Nov 19, 2014
  • Number of updates: 44
  • Update frequency: every 6.0 days
  • Top authors: woody062 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,802 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.93MB] [CPU: ▼56.27ms] Passed 4 tests

A check of server-side resources used by Woo Icon Stock
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.20 ▼37.74
Dashboard /wp-admin2.08 ▼1.2611.54 ▼49.44
Posts /wp-admin/edit.php2.09 ▼1.277.55 ▼46.31
Add New Post /wp-admin/post-new.php2.08 ▼3.805.96 ▼91.58
Media Library /wp-admin/upload.php2.08 ▼1.145.48 ▼28.26

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
tx_ok
db_upgraded
theysaidso_admin_options
icon_woo_stock_1
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
tx_faible
tx_rupture
...

Browser metrics Passed 4 tests

Checking browser requirements for Woo Icon Stock
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.67 ▼0.624.66 ▲2.9540.22 ▼4.24
Dashboard /wp-admin2,222 ▲305.82 ▲0.9699.46 ▼10.8981.48 ▲39.51
Posts /wp-admin/edit.php2,105 ▲131.98 ▼0.0339.23 ▼0.7733.76 ▼1.90
Add New Post /wp-admin/post-new.php1,540 ▲2618.47 ▲0.99675.52 ▼33.4058.47 ▲3.80
Media Library /wp-admin/upload.php1,404 ▲164.18 ▲0.0097.54 ▼15.9967.35 ▲18.95

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the icon-pro handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 11 options in the database
    • tx_ok
    • qt_faible
    • can_compress_scripts
    • tx_rupture
    • theysaidso_admin_options
    • db_upgraded
    • tx_faible
    • icon_woo_stock_1
    • widget_theysaidso_widget
    • widget_recent-comments
    • ...

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/woo-icon-stock/icon_stock.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/woo-icon-stock/icon_admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: woocommerce, e-commerce, shop, products, themes...

woo-icon-stock/icon_stock.php 85% from 13 tests

The principal PHP file in "Woo Icon Stock" v. 2.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 161 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-icon-stock.php" instead of "icon_stock.php")

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
No dangerous file extensions were detected848 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP46535365
CSS21513353
JavaScript1421277
PO File1173653

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
12 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/param.png2.30KB1.45KB▼ 37.00%
css/images/ok.png5.83KB1.82KB▼ 68.78%
css/images/stock-moyen.png1.25KB0.44KB▼ 64.97%
css/images/ico-s3.png1.09KB0.33KB▼ 69.49%
css/images/ico-sto-fai2.png1.95KB1.35KB▼ 30.75%