72% better-code-editor

Code Review | Better Code Editor

WordPress plugin Better Code Editor scored 72% from 54 tests.

About plugin

  • Plugin page: better-code-editor
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2015
  • Latest release: Feb 24, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: nazmul.hossain.nihal (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 3,053 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.11MB] [CPU: ▼8.81ms] Passed 4 tests

An overview of server-side resources used by Better Code Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.34 ▼5.24
Dashboard /wp-admin3.30 ▼0.0144.48 ▼4.96
Posts /wp-admin/edit.php3.37 ▲0.0147.13 ▼0.40
Add New Post /wp-admin/post-new.php5.44 ▼0.4472.71 ▼24.63
Media Library /wp-admin/upload.php3.21 ▼0.0234.96 ▲1.77
Code Editor /wp-admin/options-general.php?page=nhnbe-options3.1832.68

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better Code Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,997 ▲26215.86 ▲1.481.55 ▼0.0939.08 ▼4.99
Dashboard /wp-admin2,394 ▲2066.67 ▲1.82127.07 ▲21.6436.10 ▼6.67
Posts /wp-admin/edit.php2,286 ▲1974.05 ▲2.0459.68 ▲19.0735.47 ▼0.79
Add New Post /wp-admin/post-new.php1,450 ▼8316.31 ▼6.55342.12 ▼297.6915.49 ▼41.93
Media Library /wp-admin/upload.php1,597 ▲2095.90 ▲1.71113.90 ▲18.2540.84 ▼5.56
Code Editor /wp-admin/options-general.php?page=nhnbe-options1,1643.8047.7832.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 57 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Notice in wp-content/plugins/better-code-editor/better-code-editor.php+145
    Trying to access array offset on value of type bool

SRP 50% 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/better-code-editor/better-code-editor.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Javascript (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0 30 A parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Javascript (severe) in unknown
    https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js?ver=1.7.1 6597:12 Uncaught TypeError: element.dispatchEvent is not a function
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=nhnbe-options
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Code Editor), #2 (Themes for code editor)
You can take inspiration from this readme.txt

better-code-editor/better-code-editor.php 92% from 13 tests

The principal PHP file in "Better Code Editor" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 209 characters long)

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
Everything looks great! No dangerous files found in this plugin178 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP11213135
JavaScript341143

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
3 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png60.69KB20.35KB▼ 66.46%
banner-772x250.png32.42KB12.92KB▼ 60.15%
screenshot-1.png124.16KB41.88KB▼ 66.27%