10% formatting-correcter

Code Review | Formatting correcter

WordPress plugin Formatting correcter scored10%from 54 tests.

About plugin

  • Plugin page: formatting-correcter
  • Plugin version: %s by %s', 'SL_frame...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jan 19, 2014
  • Latest release: Apr 17, 2016
  • Number of updates: 57
  • Update frequency: every 14.4 days
  • Top authors: sedLex (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /3,126 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/formatting-correcter/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor

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

An overview of server-side resources used by Formatting correcter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.23 ▼4.90
Dashboard /wp-admin3.31 ▲0.0045.13 ▼1.72
Posts /wp-admin/edit.php3.36 ▲0.0046.27 ▼4.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.44 ▼2.50
Media Library /wp-admin/upload.php3.23 ▲0.0032.62 ▼1.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 159 new files
Database: 1 new table, 6 new options
New tables
wp_pluginSL_formatting_correcter
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Formatting correcter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.58 ▲0.231.68 ▼0.1537.85 ▼8.49
Dashboard /wp-admin2,195 ▲175.59 ▼0.1091.94 ▼18.8338.54 ▼6.22
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0639.41 ▼0.2634.19 ▼2.11
Add New Post /wp-admin/post-new.php1,526 ▼423.36 ▲0.38659.00 ▼33.9060.24 ▼7.44
Media Library /wp-admin/upload.php1,400 ▲34.15 ▼0.0695.32 ▼6.6542.36 ▼2.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/formatting-correcter/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/formatting-correcter/formatting-correcter.php
    • > /wp-content/plugins/formatting-correcter/core.php
    • > /wp-content/plugins/formatting-correcter/core.class.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/formatting-correcter/core/templates/my-plugin.php on line 18
    • > PHP Warning
      require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/formatting-correcter/core/templates/my-plugin.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Results page), #2 (Modification page), #3 (Parameters page)
You can take inspiration from this readme.txt

formatting-correcter/core.class.php 85% from 13 tests

The entry point to "Formatting correcter" version %s by %s', 'SL_frame... is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("formatting-correcter.php" instead of "core.class.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "%s by %s', 'SL_frame...")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin18,019 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PO File313,83808,351
PHP191,1511,9848,169
JavaScript6220232925
CSS108513459
Markdown120084
JSON10029
INI2002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity63.58
▷ Minimum class complexity1.00
▷ Maximum class complexity299.00
Average method complexity8.08
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes00.00%
Methods168
▷ Static methods3621.43%
▷ Public methods16598.21%
▷ Protected methods31.79%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
37 PNG files occupy 0.80MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/img/arrow_down.png0.27KB0.27KB0.00%
core/img/tree_node_minus.png0.14KB0.12KB▼ 15.17%
img/banner-772x250.png113.96KB37.59KB▼ 67.02%
core/img/tab_mail.png0.66KB0.62KB▼ 6.63%
core/img/tab_empty.png0.08KB0.09KB0.00%