78% border-image

Code Review | Border Image Plugin

WordPress plugin Border Image Plugin scored78%from 54 tests.

About plugin

  • Plugin page: border-image
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.5
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: Aug 26, 2020
  • Number of updates: 5
  • Update frequency: every 21.2 days
  • Top authors: borderimage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,063 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.03MB] [CPU: ▼1.78ms] Passed 4 tests

Analyzing server-side resources used by Border Image Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.36 ▼0.17
Dashboard /wp-admin3.35 ▲0.0553.46 ▲0.39
Posts /wp-admin/edit.php3.46 ▲0.1150.88 ▲1.91
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.44 ▼9.25
Media Library /wp-admin/upload.php3.25 ▲0.0242.43 ▲7.72

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Border Image Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲24214.96 ▲0.701.94 ▲0.3244.03 ▼0.57
Dashboard /wp-admin2,380 ▲2006.45 ▲0.81114.88 ▲15.57101.07 ▲56.93
Posts /wp-admin/edit.php2,315 ▲2153.68 ▲1.7156.43 ▲20.3965.70 ▲28.17
Add New Post /wp-admin/post-new.php1,719 ▲18423.21 ▲5.12666.36 ▲51.9736.73 ▼29.91
Media Library /wp-admin/upload.php1,434 ▲374.58 ▲0.4186.82 ▼15.4785.65 ▲41.44

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/border-image/inc/install.php
    • > /wp-content/plugins/border-image/template/dashboard.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/border-image/inc/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/border-image/border_image.php:13
    • > PHP Warning
      Use of undefined constant BRDIMG_URL - assumed 'BRDIMG_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/border-image/template/dashboard.php on line 270

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

border-image/border_image.php 92% from 13 tests

The main file in "Border Image Plugin" v. 0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("border-image.php" instead of "border_image.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin15,559 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,9401709,158
JavaScript41,2195375,394
SVG403639
PHP52113368

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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
6 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png47.40KB20.16KB▼ 57.46%
assets/icon-128x128.png2.03KB1.96KB▼ 3.28%
inc/assets/img/picture.png8.12KB3.17KB▼ 60.96%
inc/images/border_image.png0.97KB0.63KB▼ 35.42%
inc/assets/img/logo.png7.96KB4.03KB▼ 49.40%