71% advanced-floating-content-lite

Code Review | Advanced Floating Content

WordPress plugin Advanced Floating Content scored 71% from 54 tests.

About plugin

  • Plugin page: advanced-floating...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Nov 10, 2015
  • Latest release: Feb 21, 2022
  • Number of updates: 68
  • Update frequency: every 33.8 days
  • Top authors: codetides (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

10,000+ active / 87,323 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼294.41ms] Passed 4 tests

Server-side resources used by Advanced Floating Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.1958.34 ▲5.71
Dashboard /wp-admin3.55 ▲0.1435.87 ▲1.07
Posts /wp-admin/edit.php3.77 ▲0.1339.75 ▲1.78
Add New Post /wp-admin/post-new.php7.02 ▲0.0595.59 ▼1,182.26
Media Library /wp-admin/upload.php3.42 ▲0.1325.29 ▲1.78
All Advanced Floating Content /wp-admin/edit.php?post_type=ct_afc3.5227.63
Add New /wp-admin/post-new.php?post_type=ct_afc3.7943.15

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 3 new options
New WordPress options
ct_afc_installed_date
verified_purchase
ct_afc_options

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 /3,934 ▲20816.57 ▲0.899.11 ▲2.542.24 ▲0.15
Dashboard /wp-admin2,930 ▲766.76 ▲0.58117.24 ▼20.20156.22 ▼8.75
Posts /wp-admin/edit.php2,746 ▲523.55 ▲0.3264.56 ▲0.74155.43 ▲11.88
Add New Post /wp-admin/post-new.php1,703 ▲4216.31 ▼0.11400.45 ▼11.29169.03 ▲15.25
Media Library /wp-admin/upload.php1,746 ▲486.04 ▲0.51117.35 ▼23.49187.94 ▲4.60
All Advanced Floating Content /wp-admin/edit.php?post_type=ct_afc1,4193.4662.41135.61
Add New /wp-admin/post-new.php?post_type=ct_afc3,47110.43212.97238.23

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 3 options
    • verified_purchase
    • ct_afc_options
    • ct_afc_installed_date

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advanced-floating-content-lite/public/partials/advanced-floating-content-public-display.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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 _e() in wp-content/plugins/advanced-floating-content-lite/admin/views/advanced-floating-content-admin-display.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > 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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === advanced-floating-content-lite === )
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

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

"Advanced Floating Content" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 223 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-floating-content-lite.php" instead of "advanced-floating-content.php")

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
Everything looks great! No dangerous files found in this plugin650 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14185597572
CSS20867
JavaScript242711

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3282.05%
▷ Protected methods00.00%
▷ Private methods717.95%
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

Using a strong compression for your PNG files is a great way to speed-up 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
public/images/close.png2.35KB1.49KB▼ 36.56%
admin/assets/premium-options-1.png40.96KB18.85KB▼ 53.97%
admin/assets/premium-options-2.png103.51KB46.04KB▼ 55.52%
admin/assets/premium.png127.09KB37.95KB▼ 70.14%
admin/assets/premium-options-3.png23.15KB9.40KB▼ 59.41%