83% wp-image-borders

Code Review | WP Image Borders

WordPress plugin WP Image Borders scored83%from 54 tests.

About plugin

  • Plugin page: wp-image-borders
  • Plugin version: 2.02
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 22, 2013
  • Latest release: Jul 8, 2015
  • Number of updates: 52
  • Update frequency: every 13.8 days
  • Top authors: BenSibley (100%)

Code review

54 tests

User reviews

45 reviews

Install metrics

3,000+ active /61,552 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼15.67ms] Passed 4 tests

Server-side resources used by WP Image Borders
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0326.78 ▼16.62
Dashboard /wp-admin3.37 ▲0.0252.80 ▼13.08
Posts /wp-admin/edit.php3.34 ▼0.0242.61 ▼13.48
Add New Post /wp-admin/post-new.php5.97 ▲0.0888.71 ▼19.51
Media Library /wp-admin/upload.php3.29 ▲0.0638.07 ▲0.60
WP Image Borders /wp-admin/options-general.php?page=wp-image-borders3.2333.46

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Image Borders
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.30 ▼1.091.76 ▼0.1546.86 ▲3.40
Dashboard /wp-admin2,232 ▲445.03 ▲0.15104.69 ▼13.2139.15 ▼3.84
Posts /wp-admin/edit.php2,114 ▲252.31 ▲0.2639.96 ▲0.7031.31 ▼4.58
Add New Post /wp-admin/post-new.php1,531 ▲323.43 ▲5.12682.38 ▲66.1636.85 ▼13.70
Media Library /wp-admin/upload.php1,408 ▲204.54 ▲0.30100.05 ▼9.1643.51 ▼2.30
WP Image Borders /wp-admin/options-general.php?page=wp-image-borders1,2132.2652.4534.71

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

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp-image-borders
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wp-image-borders
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-image-borders
    • > Notice in wp-content/plugins/wp-image-borders/inc/options.php+253
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Plugin Name: Please specify the plugin name on the first line ( === wp-image-borders === )
  • Screenshots: Add images for these screenshots: #1 (This is the WP Image Borders options page), #2 (This is an example of an image modified with WP Image Borders. It's been given a white border and box shadow.)
The official readme.txt is a good inspiration

wp-image-borders/wp-image-borders.php 92% from 13 tests

This is the main PHP file of "WP Image Borders" version 2.02, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected321 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35685318
JavaScript1003
CSS1010

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.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.25MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png85.14KB43.18KB▼ 49.29%
screenshot-1.png139.27KB60.32KB▼ 56.69%
images/theme-ad.png33.69KB35.99KB0.00%