83% better-editor

Code Review | Better Editor - The dead simple inline editor toolbar (WYSIWYG editor)

WordPress plugin Better Editor - The dead simple inline editor toolbar (WYSIWYG editor) scored83%from 54 tests.

About plugin

  • Plugin page: better-editor
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: May 22, 2023
  • Number of updates: 46
  • Update frequency: every 30.0 days
  • Top authors: stefanpejcic (89.13%)pluginsclub (13.04%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,597 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.73ms] 75% from 4 tests

This is a short check of server-side resources used by Better Editor - The dead simple inline editor toolbar (WYSIWYG editor)
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,503.13ms on /wp-admin/options-general.php?page=gigamediumeditor_settings)
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.87 ▼3.84
Dashboard /wp-admin3.31 ▲0.0145.21 ▼4.12
Posts /wp-admin/edit.php3.36 ▲0.0153.80 ▲7.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.22 ▼7.11
Media Library /wp-admin/upload.php3.24 ▲0.0132.89 ▲0.16
Better Editor /wp-admin/options-general.php?page=gigamediumeditor_settings3.202,503.13

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Better Editor - The dead simple inline editor toolbar (WYSIWYG editor)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17814.26 ▼0.158.73 ▲6.6744.49 ▼7.65
Dashboard /wp-admin2,221 ▲335.19 ▲0.31103.05 ▼3.2439.14 ▼4.38
Posts /wp-admin/edit.php2,107 ▲182.31 ▲0.2640.20 ▲4.2334.78 ▲2.11
Add New Post /wp-admin/post-new.php1,528 ▲823.24 ▲0.26591.09 ▼80.2533.53 ▼21.37
Media Library /wp-admin/upload.php1,406 ▲184.40 ▲0.2995.12 ▼8.8743.15 ▼1.27
Better Editor /wp-admin/options-general.php?page=gigamediumeditor_settings9821.9427.5733.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/better-editor/index.php
    • > /wp-content/plugins/better-editor/includes/images/index.php
    • > /wp-content/plugins/better-editor/includes/css/themes/index.php
    • > /wp-content/plugins/better-editor/includes/css/index.php
    • > /wp-content/plugins/better-editor/includes/admin.php
    • > /wp-content/plugins/better-editor/includes/index.php
    • > /wp-content/plugins/better-editor/includes/js/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can look at the official readme.txt

better-editor/index.php 77% from 13 tests

This is the main PHP file of "Better Editor - The dead simple inline editor toolbar (WYSIWYG editor)" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("better-editor.php" instead of "index.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
There were no executable files found in this plugin1,265 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS175411943
PHP33630214
JavaScript266108

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/pluginsclub_logo_black.png22.36KB10.65KB▼ 52.36%