90% fa-box-shortcode

Code Review | Font Awesome Box Shortcode

WordPress plugin Font Awesome Box Shortcode scored90%from 54 tests.

About plugin

  • Plugin page: fa-box-shortcode
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.4
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Feb 27, 2020
  • Number of updates: 8
  • Update frequency: every 153.1 days
  • Top authors: stuartduff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,796 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.82ms] Passed 4 tests

A check of server-side resources used by Font Awesome Box Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.94 ▲0.23
Dashboard /wp-admin3.33 ▲0.0244.79 ▼6.97
Posts /wp-admin/edit.php3.38 ▲0.0249.39 ▼0.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.34 ▼11.42
Media Library /wp-admin/upload.php3.25 ▲0.0235.55 ▼0.58

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
fa-box-shortcode-version
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Font Awesome Box Shortcode: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.20 ▼1.561.65 ▼0.3139.51 ▼8.38
Dashboard /wp-admin2,206 ▲184.84 ▼0.04108.28 ▼7.4542.51 ▼4.41
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0138.44 ▲1.4234.78 ▲2.48
Add New Post /wp-admin/post-new.php1,533 ▼923.12 ▲4.62607.46 ▼41.1860.68 ▲4.01
Media Library /wp-admin/upload.php1,382 ▼04.19 ▲0.0196.24 ▼0.1143.00 ▼1.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • fa-box-shortcode-version
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: icons, infobox, info boxes, shortcode, fontawesome...

fa-box-shortcode/fa-box-shortcode.php 92% from 13 tests

The main file in "Font Awesome Box Shortcode" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin498 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
Sass24117225
HTML1271166
PHP23711878
JavaScript26928
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions1
▷ Named functions1100.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 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/js/images/box.png6.07KB1.01KB▼ 83.37%