84% image-uploader-for-welcart

Code Review | Image Uploader for Welcart

WordPress plugin Image Uploader for Welcart scored84%from 54 tests.

About plugin

  • Plugin page: image-uploader-fo...
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Feb 13, 2020
  • Number of updates: 74
  • Update frequency: every 25.2 days
  • Top authors: fishpie (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

5,000+ active /29,073 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.78ms] Passed 4 tests

Analyzing server-side resources used by Image Uploader for Welcart
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.48 ▼7.67
Dashboard /wp-admin3.37 ▲0.0649.38 ▼6.44
Posts /wp-admin/edit.php3.42 ▲0.0655.97 ▲6.93
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.87 ▼13.21
Media Library /wp-admin/upload.php3.29 ▲0.0637.05 ▲0.21

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Uploader for Welcart
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.28 ▼1.011.86 ▲0.0146.01 ▼3.24
Dashboard /wp-admin2,206 ▲185.84 ▲0.98100.91 ▼13.7442.69 ▲3.71
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0145.03 ▲7.7133.43 ▼1.58
Add New Post /wp-admin/post-new.php1,533 ▼423.08 ▼0.10596.17 ▼68.1156.81 ▲7.10
Media Library /wp-admin/upload.php1,391 ▲34.31 ▲0.0694.91 ▼3.4941.81 ▼4.16

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

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/image-uploader-for-welcart/image-uploader-for-welcart.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Just upload and sort images.)
Please take inspiration from this readme.txt

image-uploader-for-welcart/image-uploader-for-welcart.php Passed 13 tests

This is the main PHP file of "Image Uploader for Welcart" version 1.4.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
117 characters long description:
Create metabox with image uploader for Welcart. It allows uploading and sorting images directory from each edit page.

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
Success! There were no dangerous files found in this plugin276 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16379276

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.60
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity9.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin