78% ps-disable-auto-formatting

Code Review | PS Disable Auto Formatting

WordPress plugin PS Disable Auto Formatting scored 78% from 54 tests.

About plugin

  • Plugin page: ps-disable-auto-f...
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2
  • WordPress version: 5.9.2
  • First release: Jan 14, 2009
  • Latest release: Apr 28, 2015
  • Number of updates: 36
  • Update frequency: every 63.8 days
  • Top authors: jim912 (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

30,000+ active / 322,033 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.18MB] [CPU: ▼314.91ms] Passed 4 tests

Analyzing server-side resources used by PS Disable Auto Formatting
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.0957.58 ▲1.92
Dashboard /wp-admin3.47 ▲0.0639.51 ▲1.95
Posts /wp-admin/edit.php3.70 ▲0.0641.65 ▲1.79
Add New Post /wp-admin/post-new.php6.10 ▼0.8877.46 ▼1,259.21
Media Library /wp-admin/upload.php3.35 ▲0.0627.11 ▼4.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
ps_disable_auto_formatting

Browser metrics Passed 4 tests

An overview of browser requirements for PS Disable Auto Formatting
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲2416.40 ▲0.505.68 ▼0.832.34 ▲0.11
Dashboard /wp-admin2,893 ▲356.39 ▼0.01119.10 ▼19.63154.89 ▼9.51
Posts /wp-admin/edit.php2,696 ▲53.42 ▼0.0264.04 ▲1.70142.00 ▲3.28
Add New Post /wp-admin/post-new.php1,755 ▲4518.17 ▼2.85393.57 ▼26.62182.97 ▲5.27
Media Library /wp-admin/upload.php1,703 ▲25.73 ▼0.00142.41 ▼0.09190.03 ▲2.59
Auto Formatting /wp-admin/ps_disable_auto_formatting.php261.140.0330.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • ps_disable_auto_formatting

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ps-disable-auto-formatting/ps_disable_auto_formatting.php:34

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/ps_disable_auto_formatting.php
    • > Network (severe)
    wp-admin/ps_disable_auto_formatting.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 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: linebreak, auto formatting, paragraph, format, formatting...

ps-disable-auto-formatting/ps_disable_auto_formatting.php 92% from 13 tests

The main PHP file in "PS Disable Auto Formatting" ver. 1.0.10 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ps-disable-auto-formatting.php" instead of "ps_disable_auto_formatting.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
Good job! No executable or dangerous file extensions detected979 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript517847654
PHP1439260
PO File1222265

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin