84% batch-update-medias-infos

Code Review | Batch Update Media Informations

WordPress plugin Batch Update Media Informations scored84%from 54 tests.

About plugin

  • Plugin page: batch-update-medi...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2014
  • Latest release: Jan 6, 2020
  • Number of updates: 5
  • Update frequency: every 392.8 days
  • Top authors: grosbouff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,161 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.88ms] Passed 4 tests

Server-side resources used by Batch Update Media Informations
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.51 ▼0.62
Dashboard /wp-admin3.33 ▲0.0244.16 ▼3.05
Posts /wp-admin/edit.php3.38 ▲0.0243.72 ▼3.26
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.02 ▲15.48
Media Library /wp-admin/upload.php3.25 ▲0.0234.70 ▼0.58
Batch Update Medias /wp-admin/upload.php?page=bumi-options3.2231.33

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
bumi-db
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Batch Update Media Informations
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.001.86 ▲0.1543.32 ▼2.72
Dashboard /wp-admin2,202 ▲255.61 ▼0.0690.39 ▲5.4339.21 ▼4.22
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0034.01 ▼5.4639.15 ▲2.56
Add New Post /wp-admin/post-new.php1,540 ▲1218.43 ▼4.52602.20 ▼84.0165.67 ▲0.95
Media Library /wp-admin/upload.php1,407 ▲104.19 ▼0.0697.06 ▼4.0040.07 ▼3.11
Batch Update Medias /wp-admin/upload.php?page=bumi-options1,1051.9529.1446.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • bumi-db
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/batch-update-medias-infos/batch-update-medias-infos.php:91

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: rename, infos, gallery, description, title...

batch-update-medias-infos/batch-update-medias-infos.php 85% from 13 tests

The main PHP script in "Batch Update Media Informations" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected440 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1188103440

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods413.33%
▷ Public methods2996.67%
▷ Protected methods00.00%
▷ Private methods13.33%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin