52% richtexteditor

Code Review | Rich Text Editor

WordPress plugin Rich Text Editor scored 52% from 54 tests.

About plugin

  • Plugin page: richtexteditor
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Oct 24, 2014
  • Latest release: Dec 31, 2016
  • Number of updates: 16
  • Update frequency: every 57.9 days
  • Top authors: richtexteditor (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

100+ active / 73,127 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.15MB] [CPU: ▼48.67ms] Passed 4 tests

A check of server-side resources used by Rich Text Editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3615.57 ▼27.90
Dashboard /wp-admin3.86 ▲0.5520.74 ▼33.05
Posts /wp-admin/edit.php3.86 ▲0.5017.81 ▼29.72
Add New Post /wp-admin/post-new.php3.86 ▼2.0317.05 ▼103.99
Media Library /wp-admin/upload.php3.86 ▲0.6318.68 ▼13.23
RichTextEditor /wp-admin/admin.php?page=rte_settings3.8616.61
RTE Settings /wp-admin/admin.php?page=rte_basic_options3.8617.37
Advance Settings /wp-admin/admin.php?page=rte_advance_options3.8622.00

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rich Text Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,657 ▼7814.79 ▲0.241.65 ▼0.0243.25 ▲2.95
Dashboard /wp-admin2,051 ▼1375.77 ▲0.8994.20 ▼21.9189.57 ▲43.05
Posts /wp-admin/edit.php2,119 ▲301.97 ▼0.0346.87 ▲10.4139.20 ▲4.29
Add New Post /wp-admin/post-new.php45 ▼1,4890.44 ▼22.790.09 ▼644.5310.01 ▼39.52
Media Library /wp-admin/upload.php1,418 ▲334.17 ▼0.01109.76 ▲2.9148.06 ▲2.42
RichTextEditor /wp-admin/admin.php?page=rte_settings8312.0225.8324.74
RTE Settings /wp-admin/admin.php?page=rte_basic_options1,3812.0526.9230.66
Advance Settings /wp-admin/admin.php?page=rte_advance_options9412.0526.2326.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+56
    Methods with the same name as their class will not be constructors in a future version of PHP; RichTextEditor has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% 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)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+56
    Methods with the same name as their class will not be constructors in a future version of PHP; RichTextEditor has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+996
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFileManager has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+1587
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEWebFileProvider has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+1988
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFileFilter has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+2159
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFolderID has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+2184
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEConfigFile has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+2354
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEConfigSecurity has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+2953
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFilterText has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+2980
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFilterComment has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+2988
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFilterOhter has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+2996
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFilterElement has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+3234
    Methods with the same name as their class will not be constructors in a future version of PHP; RTEFilterAttribute has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/include_cs2.php+249
    Methods with the same name as their class will not be constructors in a future version of PHP; CuteSoftDateTime has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Deprecated in wp-content/plugins/richtexteditor/richtexteditor/server_php/phpuploader/include_phpuploader.php+371
    Methods with the same name as their class will not be constructors in a future version of PHP; PhpUploader has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Notice in wp-content/plugins/richtexteditor/richtexteditor/server_php/phpuploader/include_phpuploader.php+33
    Undefined index: ContextValue
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Notice in wp-content/plugins/richtexteditor/richtexteditor/include_rte.php+10
    Undefined variable: _SESSION
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Notice in wp-content/plugins/richtexteditor/richtexteditor_wordpress_class.php+651
    Undefined property: richtexteditor_wordpress_class::$aOptions
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Notice in wp-content/plugins/richtexteditor/richtexteditor_wordpress_class.php+651
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_settings
    • > Notice in wp-content/plugins/richtexteditor/richtexteditor/server_php/phpuploader/include_phpuploader.php+309
    A non well formed numeric value encountered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rte_advance_options
    • > Notice in wp-content/plugins/richtexteditor/richtexteditor_wordpress_class.php+640
    Undefined property: richtexteditor_wordpress_class::$loading

SRP 0% 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 items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/richtexteditor/richtexteditor/server_php/SpellCheck.php
    • > /wp-content/plugins/richtexteditor/includes/wppagelinks.php
    • > /wp-content/plugins/richtexteditor/richtexteditor/server_php/server-scripts/spellchecker.php
    • > /wp-content/plugins/richtexteditor/richtexteditor/server_php/phpuploader/ajaxuploaderresource.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/richtexteditor/richtexteditor_wordpress.php:15
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/richtexteditor/richtexteditor/server_php/server-scripts/spellchecker.php on line 89
    • > PHP Notice
      Undefined index: type in wp-content/plugins/richtexteditor/richtexteditor/server_php/phpuploader/ajaxuploaderresource.php on line 8
    • > PHP Notice
      Undefined index: textinputs in wp-content/plugins/richtexteditor/richtexteditor/server_php/server-scripts/spellchecker.php on line 23
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/richtexteditor/richtexteditor/server_php/server-scripts/spellchecker.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_ssl() in wp-content/plugins/richtexteditor/richtexteditor_wordpress_class.php:32
    • > PHP Notice
      Undefined index: file in wp-content/plugins/richtexteditor/richtexteditor/server_php/phpuploader/ajaxuploaderresource.php on line 71
    • > PHP Notice
      Undefined index: type in wp-content/plugins/richtexteditor/richtexteditor/load.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (ribbon UI.), #2 (ruler), #3 (video), #4 (youtube), #5 (HTML5), #6 (context menu), #7 (coder cleaner), #8 (image managment)
You can look at the official readme.txt

richtexteditor/richtexteditor_wordpress.php 85% from 13 tests

The principal PHP file in "Rich Text Editor" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 175 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("richtexteditor.php" instead of "richtexteditor_wordpress.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/richtexteditor/richtexteditor/server_php/phpuploader/resources/silverlight.xap
53,703 lines of code in 300 files:
LanguageFilesBlank linesComment linesLines of code
XML1613,12638129,034
JavaScript822,10937714,067
CSS183642075,038
HTML20193222,685
PHP121,0294,8291,666
ASP.NET4960581
XSD1429388
Perl12719134
ColdFusion13529110

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.21
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes12.63%
Methods271
▷ Static methods155.54%
▷ Public methods27099.63%
▷ Protected methods10.37%
▷ Private methods00.00%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
384 PNG files occupy 1.02MB with 0.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
richtexteditor/images/template.png0.45KB0.30KB▼ 33.48%
richtexteditor/images/gallery.png0.54KB0.37KB▼ 31.57%
richtexteditor/images/specialchar.png0.68KB0.48KB▼ 29.11%
richtexteditor/rtepaint5/images/frame/brooch_40.png2.76KB0.12KB▼ 95.62%
richtexteditor/images/pushbutton.png0.25KB0.13KB▼ 48.03%