84% better-code-editing

Code Review | Better Code Editing

WordPress plugin Better Code Editing scored 84% from 54 tests.

About plugin

  • Plugin page: better-code-editing
  • Plugin version: 0.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7+
  • WordPress version: 6.3.1
  • First release: Aug 25, 2017
  • Latest release: Sep 13, 2017
  • Number of updates: 9
  • Update frequency: every 2.2 days
  • Top authors: westonruter (88.89%)melchoyce (22.22%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 15,457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Better Code Editing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.38 ▼10.45
Dashboard /wp-admin3.31 ▲0.0148.37 ▼2.70
Posts /wp-admin/edit.php3.36 ▲0.0148.38 ▲2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.95 ▼3.91
Media Library /wp-admin/upload.php3.23 ▲0.0039.75 ▲4.53

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Better Code Editing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.381.70 ▼0.1442.05 ▼3.99
Dashboard /wp-admin2,206 ▲155.91 ▲0.01113.38 ▲3.4542.73 ▼1.57
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0035.95 ▼0.1931.59 ▼3.09
Add New Post /wp-admin/post-new.php1,542 ▲2818.23 ▲0.67600.48 ▼117.7653.47 ▼15.67
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0195.22 ▼6.6246.32 ▼0.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-code-editing/wp-includes/customize-manager-addendum.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-code-editing/wp-admin/user-edit-addendum.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-code-editing/wp-includes/script-loader-addendum.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-code-editing/wp-includes/widgets-addendum.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-code-editing/wp-includes/script-loader-addendum.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget_Custom_HTML' not found in wp-content/plugins/better-code-editing/wp-includes/widgets/class-wp-widget-custom-html-codemirror.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/better-code-editing/wp-admin/file-editor-addendum.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-code-editing/wp-admin/includes/user.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tested up to: Invalid plugin version format
You can take inspiration from this readme.txt

better-code-editing/better-code-editing.php Passed 13 tests

The main PHP file in "Better Code Editing" ver. 0.7.0 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
Code highlighting and linting, powered by CodeMirror.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin27,482 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript114,27812,14420,544
CSS71,1782686,253
PHP990228685

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods240.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin