84% editor-box

Code Review | Editor Box

WordPress plugin Editor Box scored84%from 54 tests.

About plugin

  • Plugin page: editor-box
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2021
  • Latest release: Jan 11, 2022
  • Number of updates: 7
  • Update frequency: every 2.0 days
  • Top authors: kkarpieszuk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /394 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.10MB] [CPU: ▼3.64ms] Passed 4 tests

A check of server-side resources used by Editor Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1243.82 ▲4.10
Dashboard /wp-admin3.42 ▲0.0747.60 ▼13.26
Posts /wp-admin/edit.php3.53 ▲0.1744.07 ▼0.98
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.54 ▲0.67
Media Library /wp-admin/upload.php3.34 ▲0.1136.09 ▼0.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Editor Box
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12314.34 ▲0.052.02 ▲0.4044.73 ▲6.33
Dashboard /wp-admin2,198 ▲235.62 ▲0.0386.90 ▼13.2546.07 ▲6.68
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0332.84 ▼4.4136.40 ▲0.70
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▲0.00575.45 ▼87.2748.27 ▼4.46
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0095.14 ▼3.9341.75 ▼3.87

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EditorBox\\add_action() in wp-content/plugins/editor-box/app/EditorBox/Hooks.php:7

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: pagelet, frontend, editor, twitter, facebook...

editor-box/plugin.php 85% from 13 tests

"Editor Box" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("editor-box.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin796 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13110186569
CSS118085
JavaScript113881
PO File1202256
Markdown1204
JSON1001

PHP code Passed 2 tests

A short 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.41
Average class complexity10.25
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods40
▷ Static methods37.50%
▷ Public methods3177.50%
▷ Protected methods00.00%
▷ Private methods922.50%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png36.77KB13.99KB▼ 61.95%
screenshot-2.png43.46KB14.50KB▼ 66.64%