63% bsd-svg-icons

Code Review | Big Sea SVG Icons

WordPress plugin Big Sea SVG Icons scored63%from 54 tests.

About plugin

  • Plugin page: bsd-svg-icons
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.4
  • WordPress version: 6.3.1
  • First release: Aug 17, 2015
  • Latest release: Aug 28, 2015
  • Number of updates: 6
  • Update frequency: every 4.0 days
  • Top authors: Big Sea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,284 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.85ms] Passed 4 tests

A check of server-side resources used by Big Sea SVG Icons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.05 ▼2.42
Dashboard /wp-admin2.10 ▼1.256.07 ▼56.13
Posts /wp-admin/edit.php2.10 ▼1.268.31 ▼43.23
Add New Post /wp-admin/post-new.php2.10 ▼3.796.52 ▼87.54
Media Library /wp-admin/upload.php2.10 ▼1.136.29 ▼28.51
SVG Icons /wp-admin/themes.php?page=bsd-svg-documentation2.115.85

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 501 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Big Sea SVG Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.68 ▼0.541.75 ▼0.3945.24 ▼0.19
Dashboard /wp-admin2,227 ▲275.85 ▼0.02108.60 ▲0.7943.38 ▲1.46
Posts /wp-admin/edit.php2,106 ▲62.06 ▲0.0640.99 ▲6.3836.68 ▲5.40
Add New Post /wp-admin/post-new.php1,545 ▲223.02 ▼0.21613.71 ▼27.7051.87 ▲0.31
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.0398.42 ▼2.9443.17 ▲0.12
SVG Icons /wp-admin/themes.php?page=bsd-svg-documentation1,1982.0122.9535.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bsd-icons-admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/themes.php?page=bsd-svg-documentation
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bsd-icons-admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bsd-svg-icons/library/templates/documentation.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_stylesheet_directory() in wp-content/plugins/bsd-svg-icons/library/templates/documentation.php:140
    • > PHP Warning
      Use of undefined constant BSD_SVG_PLUGIN_ROOT - assumed 'BSD_SVG_PLUGIN_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/bsd-svg-icons/library/class.bsd_svg_icons.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/bsd-svg-icons/library/admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bsd-svg-icons/bsd-svg-icons.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: fonts, svg, icon, icomoon

bsd-svg-icons/bsd-svg-icons.php Passed 13 tests

The main PHP script in "Big Sea SVG Icons" version 1.0.2 is automatically included on every request by WordPress
127 characters long description:
Built by designers, for designers. Add SVG images with ease, via a single function or shortcode. Comes with icons from icomoon!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,200 lines of code in 499 files:
LanguageFilesBlank linesComment linesLines of code
SVG49104912,692
PHP6154167482
CSS24026

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin