84% lcb-faq

Code Review | LCB FAQ

WordPress plugin LCB FAQ scored84%from 54 tests.

About plugin

  • Plugin page: lcb-faq
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2015
  • Latest release: Oct 12, 2015
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: Silpion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.84ms] Passed 4 tests

Server-side resources used by LCB FAQ
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.98 ▼4.23
Dashboard /wp-admin3.35 ▲0.0048.11 ▼13.83
Posts /wp-admin/edit.php3.40 ▲0.0447.35 ▼4.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.00 ▼16.79
Media Library /wp-admin/upload.php3.28 ▲0.0436.92 ▲2.18
Faq /wp-admin/edit.php?post_type=faq3.3239.14
Add new /wp-admin/post-new.php?post_type=faq3.3947.43
Faq categories /wp-admin/edit-tags.php?taxonomy=faq-category&post_type=faq3.2735.46

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for LCB FAQ
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.27 ▼1.391.92 ▼0.0443.44 ▲7.00
Dashboard /wp-admin2,237 ▲465.85 ▲0.97100.97 ▼3.6939.77 ▼3.72
Posts /wp-admin/edit.php2,117 ▲312.05 ▲0.0535.27 ▼5.3433.34 ▼2.40
Add New Post /wp-admin/post-new.php1,559 ▲3123.07 ▲4.60700.52 ▲63.5262.20 ▲6.80
Media Library /wp-admin/upload.php1,419 ▲314.13 ▼0.09107.13 ▲8.0445.68 ▲3.62
Faq /wp-admin/edit.php?post_type=faq1,1012.0035.8230.90
Add new /wp-admin/post-new.php?post_type=faq2,2687.67165.5361.40
Faq categories /wp-admin/edit-tags.php?taxonomy=faq-category&post_type=faq1,2962.1426.4130.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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)
Good news, no errors were detected

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 take a closer look at the following
  • 2× 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/lcb-faq/lcb-faq.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lcb-faq/shortcode.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: questions, faq

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

The main file in "LCB FAQ" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
31 characters long description:
Displays questions with answers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected130 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22328101
PO File16629

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions8
▷ Named functions8100.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
2 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.PNG41.46KB19.03KB▼ 54.10%
screenshot-2.PNG47.56KB21.29KB▼ 55.23%