84% content-bootstrap

Code Review | Content Bootstrap

WordPress plugin Content Bootstrap scored84%from 54 tests.

About plugin

  • Plugin page: content-bootstrap
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Jan 20, 2013
  • Latest release: Apr 26, 2015
  • Number of updates: 27
  • Update frequency: every 30.6 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.51ms] Passed 4 tests

Server-side resources used by Content Bootstrap
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.66 ▼7.54
Dashboard /wp-admin3.35 ▲0.0448.90 ▼2.00
Posts /wp-admin/edit.php3.46 ▲0.1050.75 ▼1.62
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.19 ▼10.87
Media Library /wp-admin/upload.php3.27 ▲0.0433.46 ▼1.36

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 188 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Content Bootstrap
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.55 ▼0.831.62 ▼0.6539.93 ▼6.19
Dashboard /wp-admin2,206 ▲184.82 ▼1.04100.83 ▼6.6643.57 ▼2.08
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0939.86 ▼1.6136.27 ▼0.95
Add New Post /wp-admin/post-new.php1,533 ▲423.23 ▲4.94666.24 ▲9.6454.34 ▼11.73
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0096.61 ▼10.9045.56 ▼5.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-bootstrap/content-bootstrap.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Bootstrap' not found in wp-content/plugins/content-bootstrap/bootstrap/bootstrap3.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Bootstrap' not found in wp-content/plugins/content-bootstrap/bootstrap/bootstrap2.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
1 plugin tags: widget

content-bootstrap/content-bootstrap.php 92% from 13 tests

The main PHP script in "Content Bootstrap" version 1.0.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin30,702 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
CSS6208117,893
LESS1172,0182,51210,234
HTML72461141,746
JSON100304
PHP43813296
SVG100229

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1995.00%
▷ Protected methods15.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
4 compressed PNG files occupy 0.04MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
bootstrap/bootstrap2/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
bootstrap/bootstrap2/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%