99% wp-add-attachment

Code Review | Bulk add files to media

WordPress plugin Bulk add files to media scored 99% from 54 tests.

About plugin

  • Plugin page: wp-add-attachment
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.8.1
  • First release: Jul 30, 2016
  • Latest release: Nov 29, 2017
  • Number of updates: 6
  • Update frequency: every 81.3 days
  • Top authors: lord_viper (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 479 total downloads


Plugin footprint Passed 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.03MB] [CPU: ▼138.95ms] Passed 4 tests

This is a short check of server-side resources used by Bulk add files to media
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1448.30 ▲21.00
Dashboard /wp-admin3.09 ▲0.0350.26 ▲4.51
Posts /wp-admin/edit.php3.14 ▲0.0345.88 ▼0.29
Add New Post /wp-admin/post-new.php5.45 ▲0.0199.14 ▼556.08
Media Library /wp-admin/upload.php3.03 ▲0.0332.37 ▼3.92
پلاگین افزدون به مدیا /wp-admin/admin.php?page=mgh_add_attach_config3.0131.86
انتقال به پوشه مدیا /wp-admin/admin.php?page=mgh_add_attach_mediadir3.0132.30

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Bulk add files to media
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,737 ▲14116.20 ▲0.839.72 ▲0.9047.13 ▼4.52
Dashboard /wp-admin3,001 ▲705.92 ▼0.03138.37 ▼15.20139.57 ▲18.59
Posts /wp-admin/edit.php2,770 ▲342.69 ▼0.0073.43 ▲3.0296.14 ▼4.52
Add New Post /wp-admin/post-new.php1,705 ▲3318.77 ▼0.20364.53 ▼49.99114.25 ▼0.08
Media Library /wp-admin/upload.php1,841 ▲344.99 ▼0.02146.33 ▼12.82143.09 ▲5.32
پلاگین افزدون به مدیا /wp-admin/admin.php?page=mgh_add_attach_config1,1442.1059.7795.44
انتقال به پوشه مدیا /wp-admin/admin.php?page=mgh_add_attach_mediadir1,2942.2159.6096.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (main.jpg)
The official readme.txt is a good inspiration

wp-add-attachment/wp_add_attachment.php 77% from 13 tests

The entry point to "Bulk add files to media" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-add-attachment.php" instead of "wp_add_attachment.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin392 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PO File23838136

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
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 functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.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