74% va-fast-image-upload

Code Review | VA Fast Image Upload

WordPress plugin VA Fast Image Upload scored74%from 54 tests.

About plugin

  • Plugin page: va-fast-image-upload
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: May 24, 2019
  • Latest release: May 24, 2019
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: aigenseer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /688 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.63MB] [CPU: ▲21.81ms] Passed 4 tests

Analyzing server-side resources used by VA Fast Image Upload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1674.12 ▲32.76
Dashboard /wp-admin3.33 ▲0.0385.96 ▲37.58
Posts /wp-admin/edit.php3.44 ▲0.0979.44 ▲34.69
Add New Post /wp-admin/post-new.php3.21 ▼2.6874.07 ▼17.78
Media Library /wp-admin/upload.php3.25 ▲0.0374.31 ▲43.75

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 16 new files
Database: 2 new tables, 6 new options
New tables
wp_vafastimageupload_settings
wp_vafastimageupload
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

VA Fast Image Upload: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.28 ▼1.361.66 ▼0.7140.53 ▼2.23
Dashboard /wp-admin2,215 ▲275.83 ▲0.97107.91 ▲1.4871.44 ▲30.21
Posts /wp-admin/edit.php2,113 ▲272.00 ▼0.0534.89 ▼0.9832.18 ▼0.67
Add New Post /wp-admin/post-new.php1,695 ▲16223.53 ▲0.43673.54 ▲31.5452.80 ▼0.96
Media Library /wp-admin/upload.php1,403 ▲214.20 ▲0.0299.13 ▲2.7570.47 ▲26.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_vafastimageupload_settings
    • wp_vafastimageupload
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/va-fast-image-upload/class/uploadlist.class.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function fetchPost() on null in wp-content/plugins/va-fast-image-upload/lang.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/va-fast-image-upload/index.php:11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/va-fast-image-upload/class/uploadlist.class.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function prepare_items() on null in wp-content/plugins/va-fast-image-upload/list.php:7
    • > PHP Notice
      Undefined variable: formvalues in wp-content/plugins/va-fast-image-upload/pluginsettingsform.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to a member function fetchPost() on null in wp-content/plugins/va-fast-image-upload/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/va-fast-image-upload/shortcode.php:57
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/va-fast-image-upload/class/uploadlist.class.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/va-fast-image-upload/pluginsettingsform.php:88

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: The official readme.txt is a good inspiration

va-fast-image-upload/index.php 92% from 13 tests

This is the main PHP file of "VA Fast Image Upload" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("va-fast-image-upload.php" instead of "index.php")

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 plugin770 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1089226747
Markdown14013
JavaScript106110

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity3.00
▷ Maximum class complexity33.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods2672.22%
▷ Protected methods00.00%
▷ Private methods1027.78%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants7
▷ Global constants7100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png2.94KB0.38KB▼ 87.26%