83% bcorp-visual-editor

Code Review | BCorp Visual Editor

WordPress plugin BCorp Visual Editor scored83%from 54 tests.

About plugin

  • Plugin page: bcorp-visual-editor
  • Plugin version: 0.20
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Jan 5, 2016
  • Latest release: Mar 22, 2016
  • Number of updates: 18
  • Update frequency: every 4.3 days
  • Top authors: BCorp (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /4,780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼14.82ms] Passed 4 tests

An overview of server-side resources used by BCorp Visual Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0347.18 ▼6.42
Dashboard /wp-admin3.31 ▲0.0155.51 ▲6.62
Posts /wp-admin/edit.php3.37 ▼0.4852.50 ▼11.95
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.80 ▼38.61
Media Library /wp-admin/upload.php3.24 ▲0.0138.89 ▼2.30

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BCorp Visual Editor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6613.28 ▼1.471.78 ▼0.1139.40 ▼9.10
Dashboard /wp-admin2,233 ▲335.08 ▼0.83114.91 ▼6.6641.53 ▼2.90
Posts /wp-admin/edit.php2,112 ▲152.07 ▲0.0735.46 ▼2.8235.04 ▲3.51
Add New Post /wp-admin/post-new.php1,535 ▼1123.20 ▲0.13642.55 ▲19.1458.56 ▼9.42
Media Library /wp-admin/upload.php1,415 ▲154.19 ▼0.02107.54 ▼9.5344.58 ▼6.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/bcorp-visual-editor/bcorp_visual_editor.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: "TBA"
The official readme.txt might help

bcorp-visual-editor/bcorp_visual_editor.php 92% from 13 tests

This is the main PHP file of "BCorp Visual Editor" version 0.20, 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: Please rename the main PHP file in this plugin to the plugin slug ("bcorp-visual-editor.php" instead of "bcorp_visual_editor.php")

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 plugin2,321 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG200950
JavaScript2542827
CSS2786387
PHP12510157

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/images/cell-width.png0.11KB0.11KB0.00%