84% disable-editor

Code Review | Disable Visual Editor

WordPress plugin Disable Visual Editor scored84%from 54 tests.

About plugin

  • Plugin page: disable-editor
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Aug 26, 2013
  • Latest release: Aug 26, 2013
  • Number of updates: 9
  • Update frequency: every 2.0 days
  • Top authors: dkchauhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.68MB] [CPU: ▼24.50ms] Passed 4 tests

An overview of server-side resources used by Disable Visual Editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.21 ▼17.47
Dashboard /wp-admin3.33 ▲0.0256.71 ▼7.58
Posts /wp-admin/edit.php3.38 ▲0.0248.02 ▼9.00
Add New Post /wp-admin/post-new.php3.11 ▼2.7838.45 ▼63.96
Media Library /wp-admin/upload.php3.25 ▲0.0237.01 ▼4.15

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

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

Browser metrics Passed 4 tests

Disable Visual Editor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.88 ▼0.1244.36 ▼11.01
Dashboard /wp-admin2,195 ▲275.63 ▼0.0396.86 ▼28.6841.52 ▼17.70
Posts /wp-admin/edit.php2,103 ▼02.00 ▲0.0140.85 ▼6.2236.37 ▼5.51
Add New Post /wp-admin/post-new.php6,222 ▲4,69425.89 ▲2.95886.12 ▲224.0345.82 ▼8.76
Media Library /wp-admin/upload.php1,394 ▼34.18 ▼0.0296.93 ▼21.7345.72 ▼2.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-editor/disable_visual_editor.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: disable post edit, page edit

disable-editor/disable_visual_editor.php 92% from 13 tests

The primary PHP file in "Disable Visual Editor" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("disable-editor.php" instead of "disable_visual_editor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP122781

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin