10% lr-faq

Code Review | LR Faq

WordPress plugin LR Faq scored10%from 54 tests.

About plugin

  • Plugin page: lr-faq
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.6
  • WordPress version: 6.3.1
  • First release: Mar 28, 2018
  • Latest release: Jan 1, 2021
  • Number of updates: 9
  • Update frequency: every 112.2 days
  • Top authors: logicrays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/lr-faq/lr-faq.php+65
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.97ms] Passed 4 tests

A check of server-side resources used by LR Faq
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.98 ▼37.16
Dashboard /wp-admin2.10 ▼1.206.96 ▼42.50
Posts /wp-admin/edit.php2.10 ▼1.256.60 ▼46.21
Add New Post /wp-admin/post-new.php2.10 ▼3.786.78 ▼90.02
Media Library /wp-admin/upload.php2.10 ▼1.138.10 ▼27.81
Add New /wp-admin/post-new.php?post_type=lrfaq2.105.95
LR Faqs /wp-admin/edit.php?post_type=lrfaq2.108.15
Settings /wp-admin/edit.php?post_type=lrfaq&page=lr-faq-setting-page2.106.22

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

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

Browser metrics Passed 4 tests

LR Faq: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12113.24 ▼1.323.18 ▲1.4654.35 ▲10.32
Dashboard /wp-admin2,240 ▲495.86 ▲0.78111.29 ▲2.8339.93 ▲0.94
Posts /wp-admin/edit.php2,120 ▲311.99 ▼0.0239.71 ▼1.3734.53 ▼3.13
Add New Post /wp-admin/post-new.php1,559 ▲3623.33 ▼0.06693.62 ▲60.1055.83 ▼3.16
Media Library /wp-admin/upload.php1,413 ▲254.22 ▼0.0199.48 ▼8.1343.86 ▼1.34
Add New /wp-admin/post-new.php?post_type=lrfaq2,1667.65173.2761.87
LR Faqs /wp-admin/edit.php?post_type=lrfaq1,0932.0936.3731.02
Settings /wp-admin/edit.php?post_type=lrfaq&page=lr-faq-setting-page8492.0324.6027.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/lr-faq/lr-faq.php+65
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lrfaq&page=lr-faq-setting-page
    • > Notice in wp-content/plugins/lr-faq/lr-faq.php+163
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 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/lr-faq/lr-faq.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lr-faq/includes/lr-faq-style.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Stable tag: No string
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

lr-faq/lr-faq.php Passed 13 tests

The main file in "LR Faq" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
105 characters long description:
LR Faq to the admin panel which allows you to show your faq on your website the easy with deffernt styles

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 detected1,016 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG100504
CSS708319
PHP2137191
JavaScript1052

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.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot4.png10.82KB6.86KB▼ 36.65%
images/screenshot3.png12.30KB7.03KB▼ 42.81%
images/screenshot2.png15.44KB8.95KB▼ 42.06%
images/screenshot1.png30.08KB18.10KB▼ 39.83%
images/screenshot5.png11.55KB7.18KB▼ 37.78%