83% single-page-faq

Code Review | Single Page FAQ

WordPress plugin Single Page FAQ scored83%from 54 tests.

About plugin

  • Plugin page: single-page-faq
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.2
  • WordPress version: 6.3.1
  • First release: May 24, 2015
  • Latest release: Jun 15, 2015
  • Number of updates: 4
  • Update frequency: every 6.5 days
  • Top authors: sku007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /822 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.82ms] Passed 4 tests

A check of server-side resources used by Single Page FAQ
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.68 ▲0.80
Dashboard /wp-admin3.34 ▲0.0444.47 ▼1.21
Posts /wp-admin/edit.php3.39 ▲0.0442.70 ▼4.15
Add New Post /wp-admin/post-new.php5.92 ▲0.0479.94 ▼9.99
Media Library /wp-admin/upload.php3.27 ▲0.0436.22 ▲0.09
Single Page FAQ Settings /wp-admin/options-general.php?page=single-page-faq-settings3.2330.97
Add New FAQ /wp-admin/post-new.php?post_type=single_page_faq3.3947.47
All FAQ /wp-admin/edit.php?post_type=single_page_faq3.3136.16

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
single_page_faq
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Single Page FAQ
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.19 ▼1.401.72 ▲0.1842.83 ▲0.43
Dashboard /wp-admin2,237 ▲465.85 ▼0.0399.94 ▼1.1140.97 ▼2.05
Posts /wp-admin/edit.php2,102 ▲162.01 ▲0.0134.41 ▲0.6434.39 ▼4.83
Add New Post /wp-admin/post-new.php1,546 ▲423.18 ▲5.08673.23 ▲18.7962.21 ▲12.49
Media Library /wp-admin/upload.php1,419 ▲314.14 ▼0.0399.79 ▼9.2943.62 ▼4.14
Single Page FAQ Settings /wp-admin/options-general.php?page=single-page-faq-settings8552.0724.1728.01
Add New FAQ /wp-admin/post-new.php?post_type=single_page_faq2,2097.58165.5161.26
All FAQ /wp-admin/edit.php?post_type=single_page_faq1,1211.9331.5231.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/single-page-faq/single_page_faq.php:36

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (1st Screenshot shows frontend look of faq section.), #2 (2nd Screenshot shows setting page section.), #3 (3rd Screenshot shows faq page listing in admin.), #4 (4th Screenshot is showing custom sort order value)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === single-page-faq === )
  • Donate link: Please fix this invalid URI: "#"
The official readme.txt might help

single-page-faq/single_page_faq.php 92% from 13 tests

The entry point to "Single Page FAQ" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("single-page-faq.php" instead of "single_page_faq.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected233 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13326233

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png11.50KB6.14KB▼ 46.58%
assets/screenshot-4.png17.73KB8.77KB▼ 50.53%
assets/screenshot-1.png22.40KB10.30KB▼ 54.02%
assets/screenshot-3.png44.58KB21.99KB▼ 50.67%