73% wp-easy-faqs

Code Review | WP Easy FAQs

WordPress plugin WP Easy FAQs scored73%from 54 tests.

About plugin

  • Plugin page: wp-easy-faqs
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Aug 28, 2016
  • Latest release: Jun 23, 2022
  • Number of updates: 8
  • Update frequency: every 266.1 days
  • Top authors: WEN Solutions (62.5%)wptravel (50%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by WP Easy FAQs
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.71 ▲1.50
Dashboard /wp-admin3.34 ▲0.0446.29 ▼1.23
Posts /wp-admin/edit.php3.39 ▲0.0445.27 ▼1.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.08 ▼16.53
Media Library /wp-admin/upload.php3.26 ▲0.0431.98 ▼4.10
All FAQs /wp-admin/edit.php?post_type=wp_faq3.3134.69
Add New /wp-admin/post-new.php?post_type=wp_faq3.3539.13

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Easy FAQs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.64 ▼0.658.84 ▲7.1541.69 ▲2.13
Dashboard /wp-admin2,230 ▲425.79 ▲0.92105.73 ▲2.0740.09 ▼3.72
Posts /wp-admin/edit.php2,116 ▲242.01 ▲0.0039.46 ▲2.2335.77 ▲5.73
Add New Post /wp-admin/post-new.php1,556 ▲2323.04 ▲2.17651.47 ▼22.2049.25 ▼6.85
Media Library /wp-admin/upload.php1,415 ▲274.19 ▼0.0997.43 ▼14.0041.39 ▼3.04
All FAQs /wp-admin/edit.php?post_type=wp_faq1,0871.9833.8528.41
Add New /wp-admin/post-new.php?post_type=wp_faq2,7744.18109.6696.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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wp_faq
    • > Notice in wp-content/plugins/wp-easy-faqs/admin/partials/wp-easy-faqs-content.php+60
    Undefined variable: index

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php
    • > /wp-content/plugins/wp-easy-faqs/public/partials/wp-easy-faqs-public-display.php
    • > /wp-content/plugins/wp-easy-faqs/admin/partials/wp-easy-faqs-admin-display.php
  • 48× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 88
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 50
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 38
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 108
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 123
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-easy-faqs/admin/partials/wp-easy-faqs-content.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 62
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 67
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/wp-easy-faqs/public/css/dynamic.css.php on line 93

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-easy-faqs/wp-easy-faqs.php Passed 13 tests

"WP Easy FAQs" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
53 characters long description:
Creating FAQs for your site has never been this easy!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,268 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS5126421,000
PHP19495730945
JavaScript516532323

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.78
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3384.62%
▷ Protected methods00.00%
▷ Private methods615.38%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
10 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/right-down.png1.10KB0.31KB▼ 72.20%
admin/images/left-down.png1.07KB0.29KB▼ 72.96%
admin/images/docico.png7.15KB3.26KB▼ 54.48%
admin/images/plugin.png10.22KB4.68KB▼ 54.23%
admin/images/ui-icons_222222_256x240.png6.68KB4.20KB▼ 37.05%