94% icons-enricher

Code Review | Icons Enricher

WordPress plugin Icons Enricher scored 94% from 54 tests.

About plugin

  • Plugin page: icons-enricher
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 5.8.1
  • First release: Apr 12, 2017
  • Latest release: May 23, 2017
  • Number of updates: 31
  • Update frequency: every 1.6 days
  • Top authors: copist (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active / 1,475 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.14MB] [CPU: ▼141.24ms] Passed 4 tests

This is a short check of server-side resources used by Icons Enricher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.1437.29 ▲3.49
Dashboard /wp-admin3.19 ▲0.1443.17 ▼5.04
Posts /wp-admin/edit.php3.30 ▲0.2045.57 ▲1.79
Add New Post /wp-admin/post-new.php5.57 ▲0.14102.50 ▼551.22
Media Library /wp-admin/upload.php3.14 ▲0.1338.53 ▼10.50
Icons Enricher /wp-admin/options-general.php?page=icons-enricher3.1533.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 89 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Icons Enricher
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.15 ▲0.6010.17 ▲2.3846.79 ▼0.67
Dashboard /wp-admin2,972 ▲395.85 ▼0.24147.73 ▼12.70103.10 ▼5.26
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0074.71 ▲5.4588.11 ▼0.47
Add New Post /wp-admin/post-new.php3,970 ▲2,28721.23 ▲2.92445.42 ▲66.47129.98 ▲17.14
Media Library /wp-admin/upload.php1,812 ▲55.03 ▼0.01168.10 ▲24.64120.74 ▲3.92
Icons Enricher /wp-admin/options-general.php?page=icons-enricher1,7142.1256.2074.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 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 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
Almost there! Just fix the following items
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/icons-enricher/library/IconsEnricherAjax.php
    • > /wp-content/plugins/icons-enricher/library/IconsEnricherSettings.php
    • > /wp-content/plugins/icons-enricher/library/IconsEnricherMenuIconPicker.php
    • > /wp-content/plugins/icons-enricher/library/IconsEnricherPack.php
    • > /wp-content/plugins/icons-enricher/library/IconsEnricher.php
    • > /wp-content/plugins/icons-enricher/icons-enricher.php
    • > /wp-content/plugins/icons-enricher/pages/settings_page.php
    • > /wp-content/plugins/icons-enricher/library/IconsEnricherShortcodes.php
    • > /wp-content/plugins/icons-enricher/library/IconsEnricherMediaButton.php
    • > /wp-content/plugins/icons-enricher/library/IconsEnricherStylesManager.php

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
You can take inspiration from this readme.txt

icons-enricher/icons-enricher.php Passed 13 tests

The principal PHP file in "Icons Enricher" v. 1.0.8 is loaded by WordPress automatically on each request
138 characters long description:
Enrich your website with styled, consistent, pixel-perfect, first-class, shiny-ass icons. Insert icons in the post in less than 8 seconds.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin15,378 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
SVG7198,095
JavaScript17531,0766,221
PHP10141227944
Markdown254082
JSON70027
CSS91669
HTML1010

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity14.25
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods3380.49%
▷ Protected methods819.51%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants1076.92%
▷ Class constants323.08%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin