94% un-line-break

Code Review | Un-Line-Break

WordPress plugin Un-Line-Break scored 94% from 54 tests.

About plugin

  • Plugin page: un-line-break
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 5.8.1
  • First release: Aug 29, 2016
  • Latest release: Jan 18, 2019
  • Number of updates: 17
  • Update frequency: every 51.5 days
  • Top authors: cdillon27 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,929 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼140.92ms] Passed 4 tests

An overview of server-side resources used by Un-Line-Break
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1437.87 ▲13.00
Dashboard /wp-admin3.10 ▲0.0446.58 ▼0.56
Posts /wp-admin/edit.php3.15 ▲0.0450.94 ▲2.74
Add New Post /wp-admin/post-new.php5.46 ▲0.0292.95 ▼566.00
Media Library /wp-admin/upload.php3.04 ▲0.0433.36 ▲0.14
Un-Line-Break /wp-admin/options-general.php?page=un-line-break3.0231.63

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
unlinebreak

Browser metrics Passed 4 tests

This is an overview of browser requirements for Un-Line-Break
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲8715.89 ▲0.027.12 ▼1.3451.44 ▼5.24
Dashboard /wp-admin2,975 ▲446.03 ▼0.11144.96 ▼5.16114.54 ▼2.48
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0068.08 ▼4.7795.80 ▼0.86
Add New Post /wp-admin/post-new.php1,686 ▲318.76 ▲0.02403.06 ▲0.27118.08 ▲4.45
Media Library /wp-admin/upload.php1,812 ▲55.02 ▲0.01154.42 ▼2.40120.44 ▼9.51
Un-Line-Break /wp-admin/options-general.php?page=un-line-break1,1912.3458.1983.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/un-line-break/inc/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/un-line-break/un-line-break.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
5 plugin tags: content, auto-paragraph, line breaks, shortcode, wpautop

un-line-break/un-line-break.php Passed 13 tests

The main PHP script in "Un-Line-Break" version 0.2.2 is automatically included on every request by WordPress
53 characters long description:
Improve the readability of content within shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin233 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP348102162
CSS215863
JavaScript1438

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/lnt.png0.50KB0.52KB0.00%