84% richtext-extension

Code Review | RichText Extension

WordPress plugin RichText Extension scored84%from 54 tests.

About plugin

  • Plugin page: richtext-extension
  • Plugin version: 2.4.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: May 10, 2020
  • Latest release: Oct 18, 2023
  • Number of updates: 22
  • Update frequency: every 57.3 days
  • Top authors: wildworks (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /6,121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▲3.66ms] Passed 4 tests

An overview of server-side resources used by RichText Extension
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1656.65 ▲15.70
Dashboard /wp-admin3.51 ▲0.2148.74 ▼2.55
Posts /wp-admin/edit.php3.62 ▲0.2750.30 ▲3.33
Add New Post /wp-admin/post-new.php6.10 ▲0.21102.45 ▲8.10
Media Library /wp-admin/upload.php3.43 ▲0.2038.08 ▲5.74
RichText Extension /wp-admin/options-general.php?page=richtext-extension-option3.4242.64

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by RichText Extension
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲1014.35 ▲0.111.84 ▼0.1643.00 ▼1.18
Dashboard /wp-admin2,199 ▲225.56 ▼0.0193.44 ▲6.2142.07 ▲1.30
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0439.34 ▼0.0235.53 ▼0.95
Add New Post /wp-admin/post-new.php1,696 ▲17022.09 ▼1.16647.38 ▼12.4162.32 ▲6.75
Media Library /wp-admin/upload.php1,404 ▲74.15 ▼0.0191.61 ▼16.5043.38 ▼0.81
RichText Extension /wp-admin/options-general.php?page=richtext-extension-option2,1733.1765.6042.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function richtext_extension\\add_action() in wp-content/plugins/richtext-extension/inc/class-options.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function richtext_extension\\add_action() in wp-content/plugins/richtext-extension/inc/class-enqueue.php:17

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: gutenberg, highlighter, formatting, rich text

richtext-extension/richtext-extension.php Passed 13 tests

Analyzing the main PHP file in "RichText Extension" version 2.4.0
73 characters long description:
Adds useful decoration features to the Gutenberg RichText editor toolbar.

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
Success! There were no dangerous files found in this plugin986 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP685170628
JavaScript82533197
Sass1330160
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods520.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin