83% hiweb-wc-thumbnail-upload

Code Review | WooCommerce Thumbnails Upload

WordPress plugin WooCommerce Thumbnails Upload scored83%from 54 tests.

About plugin

  • Plugin page: hiweb-wc-thumbnai...
  • Plugin version: 1.0.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Mar 22, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Den Media (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /672 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.05ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Thumbnails Upload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0244.71 ▲1.43
Dashboard /wp-admin3.33 ▼0.0251.23 ▼19.66
Posts /wp-admin/edit.php3.38 ▲0.0250.96 ▲3.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.57 ▼14.74
Media Library /wp-admin/upload.php3.25 ▲0.0238.94 ▲0.77

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Thumbnails Upload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.78 ▲0.1345.60 ▲2.40
Dashboard /wp-admin2,195 ▲185.57 ▼0.0986.50 ▼9.2937.58 ▼2.71
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0337.05 ▼6.2235.74 ▼0.45
Add New Post /wp-admin/post-new.php1,526 ▼223.10 ▲0.12644.19 ▼42.2763.52 ▲6.81
Media Library /wp-admin/upload.php1,400 ▲34.20 ▲0.0598.83 ▼4.8247.44 ▲0.29

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-wc-thumbnail-upload/include/hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-wc-thumbnail-upload/include/hooks.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 () image not found
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

hiweb-wc-thumbnail-upload/hiweb-wc-thumbnail-upload.php Passed 13 tests

"WooCommerce Thumbnails Upload" version 1.0.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
116 characters long description:
Upload pictures of products and categories directly in the list of goods and categories using the drag & drop method

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,769 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2113341,632
PHP471679
Sass15031
CSS11127

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity4.00
▷ Minimum method complexity4.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png102.81KB44.97KB▼ 56.26%
images/icon-upload.png17.78KB2.75KB▼ 84.55%