78% custom-bootstrap-editor

Code Review | Custom Bootstrap Editor

WordPress plugin Custom Bootstrap Editor scored 78% from 54 tests.

About plugin

  • Plugin page: custom-bootstrap-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.7.1
  • WordPress version: 5.9.2
  • First release: Nov 29, 2013
  • Latest release: Nov 30, 2013
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: bassjobsen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 991 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼290.01ms] Passed 4 tests

Server-side resources used by Custom Bootstrap Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0365.20 ▲16.85
Dashboard /wp-admin3.45 ▲0.0433.26 ▼2.89
Posts /wp-admin/edit.php3.68 ▲0.0337.89 ▼0.80
Add New Post /wp-admin/post-new.php6.92 ▼0.06110.26 ▼1,157.28
Media Library /wp-admin/upload.php3.33 ▲0.0330.29 ▲0.93
Custom Bootstrap Editor /wp-admin/options-general.php?page=custom-bootstrap-editor3.3024.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 64 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Bootstrap Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲3015.13 ▼0.476.82 ▲0.772.45 ▲0.37
Dashboard /wp-admin2,896 ▲426.24 ▲0.09129.88 ▼8.40160.32 ▼2.88
Posts /wp-admin/edit.php2,692 ▲43.23 ▼0.1266.25 ▲1.36208.25 ▲62.23
Add New Post /wp-admin/post-new.php1,671 ▲1020.64 ▲4.68441.53 ▲39.44168.38 ▲4.11
Media Library /wp-admin/upload.php1,702 ▲15.56 ▲0.05145.08 ▲7.99186.80 ▼1.32
Custom Bootstrap Editor /wp-admin/options-general.php?page=custom-bootstrap-editor1,0372.4253.81121.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/custom-bootstrap-editor/custom-bootstrap-editor.php+79
    unlink(wp-content/uploads/cbe/custombootstrap.css): No such file or directory

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-bootstrap-editor/custom-bootstrap-editor.php:172
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-bootstrap-editor/templates/settings.php:76

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=custom-bootstrap-editor
    • > Network (severe)
    wp-content/uploads/cbe/custombootstrap.css?ver=1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Custom Bootstrap Editor) image not found
You can look at the official readme.txt

custom-bootstrap-editor/custom-bootstrap-editor.php Passed 13 tests

The main PHP script in "Custom Bootstrap Editor" version 1.0.1 is automatically included on every request by WordPress
58 characters long description:
Add Twitter's Bootstrap CSS with LESS editor to your site.

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
Success! There were no dangerous files found in this plugin9,682 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
LESS441,0891,2485,081
PHP41,4471,0424,087
CSS100252
SVG100229
PO File191128
JavaScript1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity21.18
▷ Minimum class complexity1.00
▷ Maximum class complexity302.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes00.00%
▷ Concrete classes45100.00%
▷ Final classes00.00%
Methods366
▷ Static methods9726.50%
▷ Public methods30783.88%
▷ Protected methods00.00%
▷ Private methods5916.12%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
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
screenshot-1.png19.94KB8.02KB▼ 59.78%