77% image-bridge

Code Review | Image-Bridge

WordPress plugin Image-Bridge scored77%from 54 tests.

About plugin

  • Plugin page: image-bridge
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 4, 2023
  • Latest release: Jun 4, 2023
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: babiweb7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.68ms] Passed 4 tests

Server-side resources used by Image-Bridge
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0645.01 ▼1.97
Dashboard /wp-admin3.37 ▲0.0649.23 ▼4.63
Posts /wp-admin/edit.php3.48 ▲0.1247.95 ▼2.80
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.55 ▼13.32
Media Library /wp-admin/upload.php3.29 ▲0.0635.87 ▲3.72

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image-Bridge
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.25 ▼0.412.09 ▲0.4347.83 ▲4.06
Dashboard /wp-admin2,212 ▲385.54 ▼0.1193.59 ▼2.3678.90 ▲37.72
Posts /wp-admin/edit.php2,135 ▲382.03 ▲0.0235.62 ▼2.4633.79 ▼5.86
Add New Post /wp-admin/post-new.php6,262 ▲4,73425.86 ▲2.82987.76 ▲329.8064.48 ▲11.47
Media Library /wp-admin/upload.php1,414 ▲114.27 ▲0.07102.97 ▼0.4465.20 ▲16.94

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/image-bridge/Image-Bridge.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-bridge/functions.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === image-bridge === )
You can look at the official readme.txt

image-bridge/Image-Bridge.php 77% from 13 tests

The main PHP file in "Image-Bridge" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("image-bridge.php" instead of "Image-Bridge.php")
  • Domain Path: The domain path folder was not found ("/languages")

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
Everything looks great! No dangerous files found in this plugin356 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP712682311
CSS18045

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/my-icon.png0.42KB0.42KB0.00%
assets/images/image-bridge.png6.75KB5.62KB▼ 16.76%