78% erana-icons-font-for-visual-composer

Code Review | Erana Icons Font for Visual Composer

WordPress plugin Erana Icons Font for Visual Composer scored78%from 54 tests.

About plugin

  • Plugin page: erana-icons-font-...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Sep 23, 2016
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: eranaicons2016 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /981 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.10ms] Passed 4 tests

A check of server-side resources used by Erana Icons Font for Visual Composer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.72 ▼1.19
Dashboard /wp-admin3.36 ▲0.0152.17 ▼12.16
Posts /wp-admin/edit.php3.41 ▲0.0548.37 ▲0.97
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.26 ▼27.62
Media Library /wp-admin/upload.php3.28 ▲0.0539.48 ▲0.56

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

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

Browser metrics Passed 4 tests

Erana Icons Font for Visual Composer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.18 ▼0.171.78 ▲0.1145.18 ▲4.75
Dashboard /wp-admin2,202 ▲255.51 ▼0.0488.43 ▼2.8342.49 ▼0.87
Posts /wp-admin/edit.php2,107 ▲72.04 ▼0.0137.18 ▼4.5234.48 ▼6.05
Add New Post /wp-admin/post-new.php1,533 ▲123.40 ▲0.20634.87 ▲34.6757.32 ▼1.24
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.0696.56 ▼15.2746.75 ▼1.10

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/erana-icons-font-for-visual-composer/erana-icons.php
  • 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/erana-icons-font-for-visual-composer/include/core/erana_icons.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 41 tag instead of maximum 10
  • Screenshots: Screenshot #1 (General Settings) image missing
The official readme.txt is a good inspiration

erana-icons-font-for-visual-composer/erana-icons.php 92% from 13 tests

"Erana Icons Font for Visual Composer" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("erana-icons-font-for-visual-composer.php" instead of "erana-icons.php")

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
Everything looks great! No dangerous files found in this plugin1,414 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS252773
PHP2338382
SVG100259

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
include/img/erana.png1.88KB0.79KB▼ 58.15%