84% multiple-images-field

Code Review | Multiple Images Field

WordPress plugin Multiple Images Field scored84%from 54 tests.

About plugin

  • Plugin page: multiple-images-f...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2023
  • Latest release: Aug 27, 2023
  • Number of updates: 4
  • Update frequency: every 39.5 days
  • Top authors: delightstar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /332 total downloads

Benchmarks

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

Analyzing server-side resources used by Multiple Images Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0344.71 ▲3.68
Dashboard /wp-admin3.39 ▲0.0050.79 ▼17.16
Posts /wp-admin/edit.php3.50 ▲0.1051.78 ▲1.52
Add New Post /wp-admin/post-new.php5.97 ▲0.04114.19 ▲7.62
Media Library /wp-admin/upload.php3.31 ▲0.0440.99 ▲1.56
Multiple Images Field /wp-admin/options-general.php?page=multiple-images-field3.2937.76

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Multiple Images Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.23 ▼0.121.85 ▼0.3339.56 ▼2.36
Dashboard /wp-admin2,202 ▲255.59 ▼0.0683.18 ▼19.5039.30 ▼3.57
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0338.90 ▼0.1738.43 ▲2.87
Add New Post /wp-admin/post-new.php1,540 ▲1418.16 ▼5.30659.06 ▼61.8258.03 ▼1.32
Media Library /wp-admin/upload.php1,407 ▲74.27 ▲0.06101.70 ▼6.8545.08 ▼1.21
Multiple Images Field /wp-admin/options-general.php?page=multiple-images-field8622.0025.2229.27

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=multiple-images-field
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=multiple-images-field
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: featured image, thumbnails

multiple-images-field/multiple-images-field.php Passed 13 tests

Analyzing the main PHP file in "Multiple Images Field" version 1.0.0
56 characters long description:
Add a field for setting multiple images to posts screen.

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
Success! There were no dangerous files found in this plugin382 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7338268
JavaScript19288
CSS16026

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected