84% devicons

Code Review | Devicons

WordPress plugin Devicons scored 84% from 54 tests.

About plugin

  • Plugin page: devicons
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2018
  • Latest release: Mar 21, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ryderdamen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.03ms] Passed 4 tests

A check of server-side resources used by Devicons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.50 ▼8.05
Dashboard /wp-admin3.31 ▲0.0048.27 ▼0.71
Posts /wp-admin/edit.php3.36 ▲0.0050.30 ▲2.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.00 ▲1.80
Media Library /wp-admin/upload.php3.23 ▲0.0032.29 ▼1.15

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Devicons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.19 ▼1.201.66 ▼0.2942.86 ▲2.90
Dashboard /wp-admin2,209 ▲244.79 ▼1.24107.21 ▲0.7440.76 ▼2.14
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0740.65 ▲0.1535.23 ▼0.66
Add New Post /wp-admin/post-new.php1,537 ▲2323.18 ▲5.54673.52 ▼4.1661.95 ▲2.16
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.01109.03 ▲8.4745.69 ▲0.74

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just 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_shortcode() in wp-content/plugins/devicons/Devicons.php:13

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
7 plugin tags: css3 icon, development icons, software icons, devicon, web development icons...

devicons/Devicons.php 92% from 13 tests

The main PHP file in "Devicons" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("devicons.php" instead of "Devicons.php")

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
Good job! No executable or dangerous file extensions detected1,292 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JSON100962
SVG100244
PHP1423581
CSS2005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.61
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%
Functions5
▷ Named functions5100.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
6 PNG files occupy 0.44MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png186.94KB74.48KB▼ 60.16%
assets/icon-256x256.png7.88KB3.05KB▼ 61.27%
assets/banner-772x250.png20.65KB6.61KB▼ 68.01%
assets/screenshot-1.png183.39KB61.77KB▼ 66.32%
assets/banner-1544x500.png51.98KB13.89KB▼ 73.28%