84% target-blank-to-button-block

Code Review | Target Blank to Button Block

WordPress plugin Target Blank to Button Block scored84%from 54 tests.

About plugin

  • Plugin page: target-blank-to-b...
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2019
  • Latest release: Mar 16, 2019
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,659 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Target Blank to Button Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.55 ▼5.83
Dashboard /wp-admin3.32 ▲0.0248.61 ▼2.46
Posts /wp-admin/edit.php3.37 ▲0.0251.48 ▼1.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0299.61 ▲6.35
Media Library /wp-admin/upload.php3.24 ▲0.0240.64 ▲3.34
Button block target /wp-admin/themes.php?page=tbtbb-submenu-page3.3544.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Target Blank to Button Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.60 ▼0.425.82 ▲4.1040.74 ▼3.24
Dashboard /wp-admin2,213 ▲224.88 ▼1.02107.97 ▲1.1440.15 ▼3.40
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0339.61 ▼1.0235.76 ▼2.68
Add New Post /wp-admin/post-new.php1,517 ▲317.70 ▼0.05679.34 ▼9.8054.22 ▼0.34
Media Library /wp-admin/upload.php1,395 ▲44.23 ▲0.0395.99 ▼10.1541.83 ▼9.49
Button block target /wp-admin/themes.php?page=tbtbb-submenu-page8142.0329.0030.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-blank-to-button-block/public/tbtbb-public.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/target-blank-to-button-block/admin/tbtbb-admin.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: blank, link, gutenberg, button, block...

target-blank-to-button-block/target-blank-to-button-block.php Passed 13 tests

"Target Blank to Button Block" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
95 characters long description:
Add Target Blank to Gutenberg Button Block. Provisory fix to add target blank to button blocks.

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
There were no executable files found in this plugin91 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP472191

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png34.01KB8.70KB▼ 74.42%
assets/icon-128x128.png4.02KB1.13KB▼ 71.89%
assets/banner-1544x500.png14.97KB5.89KB▼ 60.62%
assets/screenshot-3.png46.36KB12.64KB▼ 72.74%
assets/screenshot-2.png21.29KB4.97KB▼ 76.63%