78% codemirror-for-codeeditor

Code Review | CodeMirror for CodeEditor

WordPress plugin CodeMirror for CodeEditor scored78%from 54 tests.

About plugin

  • Plugin page: codemirror-for-co...
  • Plugin version: 0.5.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.3.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2011
  • Latest release: Mar 28, 2012
  • Number of updates: 110
  • Update frequency: every 1.6 days
  • Top authors: redcocker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /6,478 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.01ms] Passed 4 tests

An overview of server-side resources used by CodeMirror for CodeEditor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1746.21 ▲3.38
Dashboard /wp-admin3.48 ▲0.1753.49 ▼5.06
Posts /wp-admin/edit.php3.53 ▲0.1750.57 ▼0.19
Add New Post /wp-admin/post-new.php6.06 ▲0.1798.06 ▲10.85
Media Library /wp-admin/upload.php3.40 ▲0.1739.84 ▼2.16
CodeMirror for CE /wp-admin/options-general.php?page=codemirror-for-codeeditor-options3.3533.88

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
db_upgraded
widget_recent-comments
cfc_setting_opt
cfc_updated
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
cfc_checkver_stamp

Browser metrics Passed 4 tests

CodeMirror for CodeEditor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.25 ▲0.112.07 ▲0.3043.96 ▼3.18
Dashboard /wp-admin2,209 ▲345.64 ▼0.0989.58 ▼24.0539.30 ▼6.85
Posts /wp-admin/edit.php2,114 ▲142.15 ▲0.1340.06 ▲5.0636.88 ▼1.20
Add New Post /wp-admin/post-new.php1,539 ▲1322.97 ▼0.02670.67 ▼37.3851.65 ▲0.62
Media Library /wp-admin/upload.php1,414 ▲114.15 ▼0.0196.11 ▼4.9143.89 ▼4.55
CodeMirror for CE /wp-admin/options-general.php?page=codemirror-for-codeeditor-options1,1501.127.6429.36

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

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=codemirror-for-codeeditor-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=codemirror-for-codeeditor-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=codemirror-for-codeeditor-options
    • > Error in wp-content/plugins/codemirror-for-codeeditor/codemirror-for-codeeditor.php+726
    Uncaught Error: Call to undefined function mysql_get_server_info() in wp-content/plugins/codemirror-for-codeeditor/codemirror-for-codeeditor.php:726
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): CodeMirror_for_CodeEditor->cfc_options_panel()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #5 {main}
    thrown

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 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 load_plugin_textdomain() in wp-content/plugins/codemirror-for-codeeditor/codemirror-for-codeeditor.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This is a highlighted code in the plugin editor.), #2 (This is AJAX search dialog.), #3 (This is Auto-omplete Demo.), #4 (This is setting panel.)
You can take inspiration from this readme.txt

codemirror-for-codeeditor/codemirror-for-codeeditor.php 85% from 13 tests

The main PHP file in "CodeMirror for CodeEditor" ver. 0.5.6.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: The description should be shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected6,807 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript162652445,316
PHP24162654
HTML6351340
CSS123328313
PO File18292179
Markdown1105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity105.00
▷ Minimum class complexity105.00
▷ Maximum class complexity105.00
Average method complexity9.00
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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

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