93% codedrill-single-image-upload

Code Review | CodeDrill Single Image Upload

WordPress plugin CodeDrill Single Image Upload scored 93% from 54 tests.

About plugin

  • Plugin page: codedrill-single-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7.4
  • WordPress version: 5.8.1
  • First release: Apr 25, 2017
  • Latest release: Apr 25, 2017
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: codedrill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 406 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by CodeDrill Single Image Upload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0133.59 ▼5.81
Dashboard /wp-admin3.07 ▲0.0143.83 ▼0.10
Posts /wp-admin/edit.php3.12 ▲0.0135.37 ▼9.36
Add New Post /wp-admin/post-new.php5.43 ▲0.0094.84 ▼597.69
Media Library /wp-admin/upload.php3.01 ▲0.0032.40 ▼10.40

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

CodeDrill Single Image Upload: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲13015.79 ▼0.077.46 ▼4.9650.75 ▼5.82
Dashboard /wp-admin2,970 ▲395.88 ▼0.09150.83 ▲6.24112.70 ▼3.54
Posts /wp-admin/edit.php2,739 ▲32.69 ▲0.0162.71 ▼3.5390.42 ▲0.61
Add New Post /wp-admin/post-new.php1,502 ▼7918.64 ▲1.19360.39 ▼180.12103.79 ▼23.05
Media Library /wp-admin/upload.php1,807 ▼05.01 ▲0.00176.44 ▲2.91121.42 ▼14.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/codedrill-single-image-upload/singleimageupload.php:29

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: add attachment, codedrill, single image upload

codedrill-single-image-upload/singleimageupload.php 77% from 13 tests

"CodeDrill Single Image Upload" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("codedrill-single-image-upload.php" instead of "singleimageupload.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 211 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG files were detected