84% bootstrapcdn

Code Review | BootstrapCDN - Wordpress CDN Plugin

WordPress plugin BootstrapCDN - Wordpress CDN Plugin scored84%from 54 tests.

About plugin

  • Plugin page: bootstrapcdn
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Aug 28, 2013
  • Latest release: Oct 9, 2013
  • Number of updates: 4
  • Update frequency: every 10.5 days
  • Top authors: jimaek (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /9,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.60ms] Passed 4 tests

Analyzing server-side resources used by BootstrapCDN - Wordpress CDN Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.05 ▼3.77
Dashboard /wp-admin3.40 ▲0.0648.15 ▼17.61
Posts /wp-admin/edit.php3.52 ▲0.1649.60 ▲5.00
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.58 ▲7.02
Media Library /wp-admin/upload.php3.33 ▲0.1040.68 ▲5.98
Bootstrap CDN /wp-admin/options-general.php?page=BootstrapCDN3.3232.37

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
BootstrapCDN_cdn_data
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

BootstrapCDN - Wordpress CDN Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.401.82 ▼0.3245.27 ▲2.32
Dashboard /wp-admin2,207 ▲194.82 ▼0.04107.56 ▼2.9340.90 ▲0.02
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0339.67 ▲5.7333.89 ▼3.59
Add New Post /wp-admin/post-new.php1,536 ▲1623.23 ▲0.11676.49 ▼9.6252.12 ▼2.53
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.0392.92 ▼2.5444.66 ▲3.33
Bootstrap CDN /wp-admin/options-general.php?page=BootstrapCDN9572.0728.1029.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=BootstrapCDN
    • > Deprecated in wp-content/plugins/bootstrapcdn/admin/options.php+48
    The each() function is deprecated. This message will be suppressed on further calls

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Main settings screen)
Please take inspiration from this readme.txt

bootstrapcdn/bootstrapcdn.php 92% from 13 tests

The entry point to "BootstrapCDN - Wordpress CDN Plugin" version 0.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin823 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP514266612
PO File1292980
JSON10060
JavaScript16257
CSS13014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity56.50
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity6.05
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1672.73%
▷ Protected methods627.27%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.71KB8.62KB▼ 37.13%