90% automatic-nbsp

Code Review | Automatic NBSP

WordPress plugin Automatic NBSP scored90%from 54 tests.

About plugin

  • Plugin page: automatic-nbsp
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Aug 7, 2013
  • Latest release: Apr 11, 2019
  • Number of updates: 23
  • Update frequency: every 90.2 days
  • Top authors: Webtroter (69.57%)damian-gora (34.78%)

Code review

54 tests

User reviews

12 reviews

Install metrics

3,000+ active /11,000 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.12MB] [CPU: ▼0.35ms] Passed 4 tests

A check of server-side resources used by Automatic NBSP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0946.08 ▲3.03
Dashboard /wp-admin3.43 ▲0.1346.90 ▼1.67
Posts /wp-admin/edit.php3.54 ▲0.1946.62 ▼5.51
Add New Post /wp-admin/post-new.php6.03 ▲0.14101.20 ▲2.75
Media Library /wp-admin/upload.php3.35 ▲0.1240.72 ▲7.26
Automatic NBSP /wp-admin/options-general.php?page=dgwt_nbsp_options3.3334.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
dgwt_nbsp_version
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
dgwt_automatic_nbsp
widget_recent-posts

Browser metrics Passed 4 tests

Automatic NBSP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.23 ▼1.155.06 ▲3.2442.43 ▼2.79
Dashboard /wp-admin2,211 ▲205.85 ▲0.9399.41 ▼14.1040.10 ▼7.97
Posts /wp-admin/edit.php2,097 ▲82.03 ▲0.0240.11 ▲0.9034.67 ▲0.20
Add New Post /wp-admin/post-new.php1,521 ▼1223.07 ▲0.09654.60 ▼21.6257.97 ▲5.57
Media Library /wp-admin/upload.php1,396 ▲144.23 ▲0.07100.60 ▼2.2443.77 ▲0.23
Automatic NBSP /wp-admin/options-general.php?page=dgwt_nbsp_options9231.7224.9927.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • dgwt_nbsp_version
    • dgwt_automatic_nbsp

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: non-breaking space, sierotki, punctuation marks, nbsp, polish...

automatic-nbsp/automatic-nbsp.php Passed 13 tests

"Automatic NBSP" version 1.5.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Automatically adds a non-breaking space (&nbsp) in the content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected803 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10267194694
PO File1334489
JavaScript119414
CSS1206

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods250.00%
▷ Protected methods00.00%
▷ Private methods250.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
No PNG files were detected