84% icon-block

Code Review | The Icon Block

WordPress plugin The Icon Block scored84%from 54 tests.

About plugin

  • Plugin page: icon-block
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2021
  • Latest release: Jul 30, 2023
  • Number of updates: 19
  • Update frequency: every 35.5 days
  • Top authors: ndiego (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active /83,452 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.19ms] Passed 4 tests

A check of server-side resources used by The Icon Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.14 ▼4.46
Dashboard /wp-admin3.33 ▲0.0344.21 ▼9.52
Posts /wp-admin/edit.php3.38 ▲0.0248.31 ▼2.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.70 ▼8.24
Media Library /wp-admin/upload.php3.25 ▲0.0240.99 ▲6.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by The Icon Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.19 ▼1.191.92 ▼0.3146.01 ▲0.33
Dashboard /wp-admin2,206 ▲184.84 ▼1.07103.70 ▼15.0840.62 ▼4.75
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.1835.21 ▼10.8631.30 ▼4.69
Add New Post /wp-admin/post-new.php1,692 ▲17223.13 ▲2.14647.87 ▼16.8765.95 ▲11.53
Media Library /wp-admin/upload.php1,382 ▼34.24 ▲0.08100.22 ▼20.8840.18 ▼10.79

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/icon-block/icon-block.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: icon block, block, svg block, icon, svg

icon-block/icon-block.php Passed 13 tests

The principal PHP file in "The Icon Block" v. 1.6.0 is loaded by WordPress automatically on each request
70 characters long description:
Effortlessly add SVG icons and graphics to the WordPress block editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin136 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON100119
PHP42209
JavaScript1056
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin