99% full-width-distraction-free-writing

Code Review | Full-Width Distraction-Free Writing

WordPress plugin Full-Width Distraction-Free Writing scored 99% from 54 tests.

About plugin

  • Plugin page: full-width-distra...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.6
  • WordPress version: 5.8.1
  • First release: Oct 14, 2016
  • Latest release: Oct 14, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: gschoppe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 962 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼143.53ms] Passed 4 tests

An overview of server-side resources used by Full-Width Distraction-Free Writing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.41 ▲14.04
Dashboard /wp-admin3.07 ▲0.0146.53 ▼0.93
Posts /wp-admin/edit.php3.12 ▲0.0143.89 ▲1.54
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.56 ▼569.41
Media Library /wp-admin/upload.php3.01 ▲0.0128.04 ▼5.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Full-Width Distraction-Free Writing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.96 ▲0.4110.22 ▼0.5148.74 ▼1.65
Dashboard /wp-admin2,966 ▲355.88 ▼0.30151.49 ▲6.37111.02 ▲8.41
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0166.15 ▼0.9180.82 ▼7.59
Add New Post /wp-admin/post-new.php1,872 ▲20019.16 ▲0.27366.66 ▼4.43113.84 ▲9.30
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.02142.67 ▼18.81118.62 ▼23.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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)
Even though no errors were found, 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

full-width-distraction-free-writing/fullwidth-dfw.php 85% from 13 tests

The principal PHP file in "Full-Width Distraction-Free Writing" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("full-width-distraction-free-writing.php" instead of "fullwidth-dfw.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected158 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods133.33%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128.png7.28KB4.90KB▼ 32.69%
assets/icon-256.png13.39KB8.05KB▼ 39.85%