84% bulk-media-register

Code Review | Bulk Media Register

WordPress plugin Bulk Media Register scored84%from 54 tests.

About plugin

  • Plugin page: bulk-media-register
  • Plugin version: 1.36
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Jun 1, 2020
  • Latest release: Oct 29, 2023
  • Number of updates: 79
  • Update frequency: every 15.8 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

8,000+ active /72,856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.34MB] [CPU: ▼6.24ms] Passed 4 tests

An overview of server-side resources used by Bulk Media Register
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3636.64 ▲0.29
Dashboard /wp-admin3.66 ▲0.3149.78 ▼5.88
Posts /wp-admin/edit.php3.77 ▲0.4145.71 ▼2.12
Add New Post /wp-admin/post-new.php6.24 ▲0.3581.12 ▼17.26
Media Library /wp-admin/upload.php3.58 ▲0.3536.49 ▲3.14
Cron Event /wp-admin/admin.php?page=bulkmediaregister-wpcron3.5530.58
Select Register /wp-admin/admin.php?page=bulkmediaregister-selectregister3.5841.32
Bulk Media Register /wp-admin/admin.php?page=bulkmediaregister3.5531.69
Settings /wp-admin/admin.php?page=bulkmediaregister-settings3.5532.56
Bulk Register /wp-admin/admin.php?page=bulkmediaregister-register3.5633.08

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
bulkmediaregister_notice
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Bulk Media Register
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.17 ▼0.181.72 ▲0.1042.02 ▲1.06
Dashboard /wp-admin2,237 ▲605.65 ▼0.0195.42 ▲8.9342.73 ▲3.18
Posts /wp-admin/edit.php2,139 ▲392.02 ▼0.0234.21 ▼1.9733.89 ▼0.73
Add New Post /wp-admin/post-new.php1,557 ▲3123.29 ▲0.31672.50 ▲38.0760.54 ▲0.23
Media Library /wp-admin/upload.php1,436 ▲394.18 ▲0.0295.21 ▼1.4942.05 ▼1.64
Cron Event /wp-admin/admin.php?page=bulkmediaregister-wpcron8312.0322.7124.90
Select Register /wp-admin/admin.php?page=bulkmediaregister-selectregister1,7582.1323.0339.34
Bulk Media Register /wp-admin/admin.php?page=bulkmediaregister8682.0324.0430.95
Settings /wp-admin/admin.php?page=bulkmediaregister-settings1,5772.2738.9625.93
Bulk Register /wp-admin/admin.php?page=bulkmediaregister-register1,4992.0023.7027.74

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/bulk-media-register/lib/class-tt-bulkmediaregister-list-table.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bulk-media-register/lib/class-bulkmediaregisteradmin.php:36
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-screen.php): failed to open stream: No such file or directory in wp-content/plugins/bulk-media-register/lib/class-tt-bulkmediaregister-list-table.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/bulk-media-register/lib/class-bulkmediaregister.php:1046
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/bulk-media-register/lib/class-bulkmediaregister.php:1046
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bulk-media-register/lib/class-tt-bulkmediaregister-list-table.php on line 26

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: files, ftp, sync, import, uploads...

bulk-media-register/bulkmediaregister.php 92% from 13 tests

The entry point to "Bulk Media Register" version 1.36 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bulk-media-register.php" instead of "bulkmediaregister.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected3,630 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP52705551,852
JavaScript42041011,481
CSS181297

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity85.00
▷ Minimum class complexity30.00
▷ Maximum class complexity126.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods2857.14%
▷ Protected methods00.00%
▷ Private methods2142.86%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin