71% advanced-floating-content-lite

Code Review | Advanced Floating Content

WordPress plugin Advanced Floating Content scored71%from 54 tests.

About plugin

  • Plugin page: advanced-floating...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 10, 2015
  • Latest release: Oct 30, 2023
  • Number of updates: 90
  • Update frequency: every 32.3 days
  • Top authors: codetides (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active /114,489 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.20ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Floating Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1640.66 ▲3.20
Dashboard /wp-admin3.46 ▲0.1550.21 ▼0.77
Posts /wp-admin/edit.php3.57 ▲0.2146.54 ▼4.92
Add New Post /wp-admin/post-new.php6.06 ▲0.1794.04 ▲10.25
Media Library /wp-admin/upload.php3.38 ▲0.1537.53 ▲3.28
All Advanced Floating Content /wp-admin/edit.php?post_type=ct_afc3.4234.43
Add New /wp-admin/post-new.php?post_type=ct_afc3.6247.13

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
ct_afc_remind_later
theysaidso_admin_options
widget_recent-posts
ct_afc_remind_date
ct_afc_installed_date
ct_afc_options
verified_purchase
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Floating Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲18113.57 ▼0.845.78 ▲3.9342.58 ▲0.53
Dashboard /wp-admin2,234 ▲565.84 ▲0.1391.79 ▼22.0639.00 ▼4.26
Posts /wp-admin/edit.php2,120 ▲202.31 ▲0.2836.27 ▼4.2134.23 ▼7.10
Add New Post /wp-admin/post-new.php1,560 ▲3223.18 ▲0.18661.02 ▼144.2136.08 ▼26.72
Media Library /wp-admin/upload.php1,443 ▲434.22 ▼0.0192.30 ▼22.3240.62 ▼6.28
All Advanced Floating Content /wp-admin/edit.php?post_type=ct_afc1,0872.2234.5330.93
Add New /wp-admin/post-new.php?post_type=ct_afc2,6878.51190.89135.29

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
  • This plugin does not fully uninstall, leaving 11 options in the database
    • ct_afc_remind_later
    • ct_afc_options
    • theysaidso_admin_options
    • verified_purchase
    • ct_afc_installed_date
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • ct_afc_remind_date
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/advanced-floating-content-lite/public/partials/advanced-floating-content-public-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/advanced-floating-content-lite/admin/views/advanced-floating-content-premium-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-floating-content-lite/admin/views/advanced-floating-content-admin-display.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=ct_afc
    • > Network (severe)
    https://codetides.piwikpro.com/piwik.js - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === advanced-floating-content-lite === )
You can look at the official readme.txt

advanced-floating-content-lite/advanced-floating-content.php 77% from 13 tests

The main PHP script in "Advanced Floating Content" version 1.2.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-floating-content-lite.php" instead of "advanced-floating-content.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 223 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected720 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14171609610
CSS20880
JavaScript292930

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3482.93%
▷ Protected methods00.00%
▷ Private methods717.07%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.29MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/premium.png127.09KB37.95KB▼ 70.14%
admin/assets/premium-options-3.png23.15KB9.40KB▼ 59.41%
admin/assets/premium-options-1.png40.96KB18.85KB▼ 53.97%
public/images/close.png2.35KB1.49KB▼ 36.56%
admin/assets/premium-options-2.png103.51KB46.04KB▼ 55.52%