84% bf-advanced-images

Code Review | BF Advanced Images

WordPress plugin BF Advanced Images scored84%from 54 tests.

About plugin

  • Plugin page: bf-advanced-images
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2021
  • Latest release: Mar 7, 2023
  • Number of updates: 4
  • Update frequency: every 119.8 days
  • Top authors: bornfight (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,873 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by BF Advanced Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.21 ▲2.40
Dashboard /wp-admin3.32 ▲0.0148.43 ▼13.25
Posts /wp-admin/edit.php3.37 ▲0.0149.48 ▼3.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.22 ▼8.48
Media Library /wp-admin/upload.php3.24 ▲0.0137.68 ▲4.11
BF Advanced Images Options /wp-admin/tools.php?page=bf-advanced-images3.2633.54

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for BF Advanced Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.25 ▲0.071.63 ▼0.0541.92 ▼0.07
Dashboard /wp-admin2,204 ▲275.59 ▼0.0884.98 ▼6.8640.30 ▲0.23
Posts /wp-admin/edit.php2,109 ▲62.16 ▲0.2142.14 ▲4.9635.34 ▲2.91
Add New Post /wp-admin/post-new.php1,542 ▲518.44 ▲0.02630.87 ▲8.3369.59 ▲1.27
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.0298.23 ▼4.3544.54 ▲2.48
BF Advanced Images Options /wp-admin/tools.php?page=bf-advanced-images9021.9925.0432.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'bfAdvancedImages\\core\\BFImagesDirectoryOptions' not found in wp-content/plugins/bf-advanced-images/templates/admin/bf-advanced-images-admin-display.php:8

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "/"
The official readme.txt might help

bf-advanced-images/bf-advanced-images.php Passed 13 tests

The main PHP script in "BF Advanced Images" version 1.0.1 is automatically included on every request by WordPress
45 characters long description:
Creating images on demand, image optimization

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,105 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP242724101,022
Markdown133056
JSON20019
JavaScript1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity11.07
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods73
▷ Static methods1926.03%
▷ Public methods6994.52%
▷ Protected methods00.00%
▷ Private methods45.48%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ 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
PNG images were not found in this plugin