84% lh-faq-shortcode

Code Review | LH FAQ Shortcode

WordPress plugin LH FAQ Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: lh-faq-shortcode
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 7, 2016
  • Latest release: Sep 14, 2018
  • Number of updates: 5
  • Update frequency: every 456.0 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.94ms] Passed 4 tests

Server-side resources used by LH FAQ Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.01 ▼1.30
Dashboard /wp-admin3.31 ▼0.0448.61 ▼17.25
Posts /wp-admin/edit.php3.36 ▲0.0051.30 ▲1.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.99 ▼2.23
Media Library /wp-admin/upload.php3.23 ▲0.0040.62 ▲2.37

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for LH FAQ Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.35 ▲0.071.83 ▲0.0741.57 ▼0.19
Dashboard /wp-admin2,198 ▲215.61 ▲0.0386.90 ▼3.3938.92 ▼3.14
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0535.27 ▼1.5633.62 ▼1.63
Add New Post /wp-admin/post-new.php1,526 ▼323.50 ▼0.21686.29 ▼30.7963.91 ▲10.12
Media Library /wp-admin/upload.php1,403 ▲64.11 ▼0.05114.11 ▲16.1744.36 ▼2.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-faq-shortcode/lh-faq-shortcode.php:193

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

lh-faq-shortcode/lh-faq-shortcode.php Passed 13 tests

The main PHP script in "LH FAQ Shortcode" version 1.02 is automatically included on every request by WordPress
23 characters long description:
Creates a faq shortcode

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
There were no executable files found in this plugin160 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1932392
JavaScript146468

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected