84% icon-fonts

Code Review | Icon Fonts

WordPress plugin Icon Fonts scored84%from 54 tests.

About plugin

  • Plugin page: icon-fonts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2015
  • Latest release: Jun 13, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: sydcode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /11,717 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
Installer ran successfully

Server metrics [RAM: ▲2.56MB] [CPU: ▲2.61ms] Passed 4 tests

A check of server-side resources used by Icon Fonts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.52 ▼3.07
Dashboard /wp-admin6.78 ▲3.4857.81 ▲6.26
Posts /wp-admin/edit.php6.91 ▲3.5552.40 ▲5.25
Add New Post /wp-admin/post-new.php9.07 ▲3.1988.29 ▲2.01
Media Library /wp-admin/upload.php6.84 ▲3.6241.12 ▲10.73
Icon Fonts /wp-admin/options-general.php?page=icon-fonts6.7535.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 148 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Icon Fonts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9714.46 ▼0.142.03 ▼0.0142.94 ▼2.56
Dashboard /wp-admin2,216 ▲284.89 ▼1.08114.89 ▼1.6443.58 ▲0.46
Posts /wp-admin/edit.php2,098 ▲62.04 ▲0.0336.99 ▲1.6531.06 ▼4.20
Add New Post /wp-admin/post-new.php1,540 ▲2123.50 ▲0.13728.47 ▲97.9567.28 ▲19.17
Media Library /wp-admin/upload.php1,395 ▲44.23 ▼0.0294.20 ▼11.0439.70 ▼2.64
Icon Fonts /wp-admin/options-general.php?page=icon-fonts1,2242.5439.4230.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/icon-fonts/icon-fonts.php:28

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: font, webfont, icon font, foundation, icon...

icon-fonts/icon-fonts.php 92% from 13 tests

The entry point to "Icon Fonts" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 288 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected33,847 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
CSS453,52413917,764
SVG1631215,461
PHP758137552
JavaScript2101569
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity55.00
▷ Minimum class complexity55.00
▷ Maximum class complexity55.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin