10% button-with-fontawesome-icons-by-like-agency

Code Review | Button with FontAwesome icons by LIKE.agency

WordPress plugin Button with FontAwesome icons by LIKE.agency scored10%from 54 tests.

About plugin

  • Plugin page: button-with-fonta...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Nov 20, 2017
  • Latest release: Nov 24, 2017
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: likeagency (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /589 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/button-with-fontawesome-icons-by-like-agency/lbfa_widget.php+46
    Methods with the same name as their class will not be constructors in a future version of PHP; like_fa_btn_widget has a deprecated constructor

Server metrics [RAM: ▼1.77MB] [CPU: ▼52.52ms] Passed 4 tests

An overview of server-side resources used by Button with FontAwesome icons by LIKE.agency
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.255.90 ▼34.06
Dashboard /wp-admin2.24 ▼1.076.07 ▼41.86
Posts /wp-admin/edit.php2.24 ▼1.126.24 ▼45.79
Add New Post /wp-admin/post-new.php2.24 ▼3.657.19 ▼88.37
Media Library /wp-admin/upload.php2.24 ▼0.996.08 ▼30.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_like_fa_btn_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Button with FontAwesome icons by LIKE.agency
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.39 ▼0.842.04 ▲0.1939.58 ▼4.08
Dashboard /wp-admin2,244 ▲625.11 ▼0.77115.42 ▲11.7442.72 ▲1.81
Posts /wp-admin/edit.php2,129 ▲402.29 ▲0.2940.98 ▼5.8234.73 ▼0.36
Add New Post /wp-admin/post-new.php1,541 ▲2723.31 ▲5.78676.13 ▲33.6338.62 ▼20.66
Media Library /wp-admin/upload.php1,420 ▲324.40 ▲0.16103.73 ▼5.2945.91 ▲0.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/button-with-fontawesome-icons-by-like-agency/lbfa_widget.php+46
    Methods with the same name as their class will not be constructors in a future version of PHP; like_fa_btn_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_like_fa_btn_widget
    • db_upgraded
    • widget_recent-comments

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)
Everything seems fine, however this is by no means 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_action() in wp-content/plugins/button-with-fontawesome-icons-by-like-agency/lbfa_widget.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 75% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
  • Plugin Name: Please specify the plugin name on the first line ( === button-with-fontawesome-icons-by-like-agency === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Icon on square background positioned on top sample-01.png), #2 (Icon on circle background positioned on the left sample-02.png)
  • Stable tag: No value
The official readme.txt is a good inspiration

button-with-fontawesome-icons-by-like-agency/lbfa_widget.php 77% from 13 tests

The entry point to "Button with FontAwesome icons by LIKE.agency" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("button-with-fontawesome-icons-by-like-agency.php" instead of "lbfa_widget.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 325 characters long)

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
Good job! No executable or dangerous file extensions detected669 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13949367
PO File15355164
CSS2330138

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin