84% rk-image-upload

Code Review | Rk Image Upload

WordPress plugin Rk Image Upload scored84%from 54 tests.

About plugin

  • Plugin page: rk-image-upload
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2014
  • Latest release: Aug 10, 2017
  • Number of updates: 16
  • Update frequency: every 61.2 days
  • Top authors: rkc.zira (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,997 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.66ms] Passed 4 tests

An overview of server-side resources used by Rk Image Upload
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.48 ▼2.07
Dashboard /wp-admin3.32 ▼0.0349.69 ▼5.99
Posts /wp-admin/edit.php3.37 ▲0.0144.59 ▼2.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.66 ▼10.52
Media Library /wp-admin/upload.php3.24 ▲0.0131.42 ▼3.74

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_rk_image_upload_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Rk Image Upload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.40 ▲0.171.65 ▼0.0436.77 ▼8.05
Dashboard /wp-admin2,197 ▲175.51 ▼0.0885.13 ▼7.2839.83 ▲0.73
Posts /wp-admin/edit.php2,116 ▲162.25 ▲0.2835.10 ▲1.2334.39 ▼2.66
Add New Post /wp-admin/post-new.php1,530 ▲423.27 ▼0.41664.79 ▼32.8962.12 ▲3.00
Media Library /wp-admin/upload.php1,415 ▲214.30 ▲0.0999.13 ▼1.2842.31 ▼2.48

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_rk_image_upload_widget
    • widget_recent-comments
    • 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rk-image-upload/rk-image-upload.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: image-upload, image, upload, rk-image-upload

rk-image-upload/rk-image-upload.php Passed 13 tests

The main file in "Rk Image Upload" v. 2.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
A simple plugin that Adds a widget to upload a single image.

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
Success! There were no dangerous files found in this plugin125 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1122298
JavaScript101327

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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