10% better-file-editor

Code Review | Better File Editor

WordPress plugin Better File Editor scored10%from 54 tests.

About plugin

  • Plugin page: better-file-editor
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 6.3.1
  • First release: Jun 13, 2009
  • Latest release: Oct 18, 2015
  • Number of updates: 41
  • Update frequency: every 56.5 days
  • Top authors: bpetty (92.68%)logikal16 (9.76%)

Code review

54 tests

User reviews

17 reviews

Install metrics

700+ active /39,529 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/better-file-editor/better_file_editor.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; BetterFileEditorPlugin has a deprecated constructor

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.09ms] Passed 4 tests

A check of server-side resources used by Better File Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.35 ▼2.87
Dashboard /wp-admin3.31 ▲0.0150.94 ▼1.54
Posts /wp-admin/edit.php3.37 ▲0.0152.80 ▲1.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.10 ▼9.62
Media Library /wp-admin/upload.php3.24 ▲0.0137.07 ▼2.31

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Better File Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.181.68 ▲0.0744.14 ▼2.27
Dashboard /wp-admin2,198 ▲245.61 ▲0.1084.21 ▼11.6341.00 ▼0.83
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.1835.66 ▼0.4836.57 ▼2.82
Add New Post /wp-admin/post-new.php1,526 ▼523.06 ▼0.05646.75 ▼32.8058.60 ▲0.68
Media Library /wp-admin/upload.php1,403 ▲34.27 ▲0.1394.90 ▼16.2442.70 ▼8.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 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/better-file-editor/better_file_editor.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Theme Editor)
You can look at the official readme.txt

better-file-editor/better_file_editor.php 85% from 13 tests

The principal PHP file in "Better File Editor" v. 2.3.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("better-file-editor.php" instead of "better_file_editor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected759 lines of code in 325 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3215644665
PHP191736
Sass15035
JSON10022
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png113.31KB35.78KB▼ 68.42%