10% fl3r-user-agent-comments

Code Review | FL3R User Agent Comments

WordPress plugin FL3R User Agent Comments scored 10% from 54 tests.

About plugin

  • Plugin page: fl3r-user-agent-c...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.1-6.0
  • WordPress version: 6.3.1
  • First release: Feb 23, 2015
  • Latest release: Jun 8, 2022
  • Number of updates: 55
  • Update frequency: every 48.4 days
  • Top authors: armandofiore (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,304 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/fl3r-user-agent-comments/include/browser.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; Browser has a deprecated constructor

Server metrics [RAM: ▼0.95MB] [CPU: ▼32.92ms] Passed 4 tests

This is a short check of server-side resources used by FL3R User Agent Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.52 ▲1.91
Dashboard /wp-admin3.00 ▼0.3123.62 ▼24.06
Posts /wp-admin/edit.php3.00 ▼0.3621.98 ▼27.36
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.12 ▼69.30
Media Library /wp-admin/upload.php3.00 ▼0.2324.34 ▼10.96
FL3R User Agent Comments /wp-admin/options-general.php?page=fl3r-user-agent-comments3.0023.38

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 179 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
fuac_options
recovery_mode_email_last_sent
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for FL3R User Agent Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,880 ▼93112.30 ▼1.022.00 ▼2.7041.71 ▼0.34
Dashboard /wp-admin1,289 ▼9171.38 ▼4.4216.15 ▼77.6535.43 ▼4.00
Posts /wp-admin/edit.php2,090 ▲12.06 ▼0.0039.11 ▼0.1243.59 ▲9.08
Add New Post /wp-admin/post-new.php1,670 ▲13621.98 ▼1.36711.70 ▲47.7730.93 ▼19.31
Media Library /wp-admin/upload.php1,395 ▲134.18 ▼0.0896.10 ▼11.8341.74 ▼2.50
FL3R User Agent Comments /wp-admin/options-general.php?page=fl3r-user-agent-comments2,0702.2237.2581.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • fuac_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/fl3r-user-agent-comments/start.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/js/jquery.dd.min.js - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-security.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-restyle.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-localization.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-patch.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-update.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-paypal.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-add.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=fl3r-user-agent-comments
    • > Network (severe)
    wp-content/plugins/fl3r-user-agent-comments/images/gui/dash-first.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (FL3R User Agent Comments in a comment.), #2 (Currently supported about 60 browsers, 100 OS and some bots.), #3 (Comments in widget with FL3R User Agent Comments support. Available only with "After comment author name" setting.), #4 (Settings.), #5 (Credits.)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

fl3r-user-agent-comments/start.php 92% from 13 tests

The principal PHP file in "FL3R User Agent Comments" v. 2.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fl3r-user-agent-comments.php" instead of "start.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin8,067 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,8271,9996,812
PHP22181751,039
CSS1166216

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 205)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity205.00
▷ Minimum class complexity205.00
▷ Maximum class complexity205.00
Average method complexity205.00
▷ Minimum method complexity205.00
▷ Maximum method complexity205.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
170 PNG files occupy 0.53MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/browser/wordpress.com.png1.73KB1.50KB▼ 13.35%
images/os/dragonfly bsd.png1.54KB1.39KB▼ 9.84%
images/os/windows-98.png2.77KB1.62KB▼ 41.34%
images/os/sailfish os.png0.91KB1.22KB0.00%
images/browser/wordpress.png2.60KB1.84KB▼ 29.16%