78% myfaq

Code Review | MYFAQ Plugin

WordPress plugin MYFAQ Plugin scored78%from 54 tests.

About plugin

  • Plugin page: myfaq
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 5, 2014
  • Latest release: Jan 8, 2017
  • Number of updates: 26
  • Update frequency: every 42.3 days
  • Top authors: Goback2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,063 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.51MB] [CPU: ▼9.88ms] Passed 4 tests

A check of server-side resources used by MYFAQ Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1754.41 ▲9.40
Dashboard /wp-admin3.48 ▲0.1762.91 ▲9.68
Posts /wp-admin/edit.php3.57 ▲0.2159.15 ▲2.20
Add New Post /wp-admin/post-new.php3.33 ▼2.5645.94 ▼60.81
Media Library /wp-admin/upload.php3.40 ▲0.1751.04 ▲13.27
Add New /wp-admin/post-new.php?post_type=my_faq3.3242.75
help /wp-admin/edit.php?post_type=my_faq&page=myfaq_admin_page_help_fn3.3742.91
settings /wp-admin/edit.php?post_type=my_faq&page=myfaq_admin_page_fn3.3438.67
All FAQ's /wp-admin/edit.php?post_type=my_faq3.4347.75
FAQ Category /wp-admin/edit-tags.php?taxonomy=g_MYFAQ_cat&post_type=my_faq3.3943.48

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for MYFAQ Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9714.18 ▼0.171.99 ▲0.2343.66 ▲1.66
Dashboard /wp-admin2,218 ▲415.56 ▼0.0087.59 ▼3.9094.96 ▲51.95
Posts /wp-admin/edit.php2,145 ▲421.97 ▼0.0335.38 ▼5.6533.35 ▼6.01
Add New Post /wp-admin/post-new.php1,578 ▲5022.10 ▼0.92760.31 ▲120.4250.23 ▼4.25
Media Library /wp-admin/upload.php1,435 ▲354.13 ▼0.05106.80 ▼4.9281.69 ▲33.55
Add New /wp-admin/post-new.php?post_type=my_faq2,3507.52186.69146.34
help /wp-admin/edit.php?post_type=my_faq&page=myfaq_admin_page_help_fn8211.9926.3735.35
settings /wp-admin/edit.php?post_type=my_faq&page=myfaq_admin_page_fn9112.3026.3030.28
All FAQ's /wp-admin/edit.php?post_type=my_faq1,1771.9331.4930.08
FAQ Category /wp-admin/edit-tags.php?taxonomy=g_MYFAQ_cat&post_type=my_faq1,3092.1227.2333.04

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=my_faq
    • > Notice in wp-content/plugins/myfaq/CONTENTS/PHP/all.fns.php+378
    Undefined index: post_type
    • > GET request to /wp-admin/edit.php?post_type=my_faq&page=myfaq_admin_page_fn
    • > User deprecated in wp-includes/functions.php+5453
    Function get_all_category_ids is deprecated since version 4.0.0! Use get_terms() instead.
    • > GET request to /wp-admin/edit.php?post_type=my_faq&page=myfaq_admin_page_fn
    • > Notice in wp-content/plugins/myfaq/CONTENTS/PHP/all.fns.php+293
    Undefined index: g_faq-per-page

SRP 50% 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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/myfaq/index.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/myfaq/CONTENTS/PHP/all.fns.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/myfaq/CONTENTS/load.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #10, #11, #12, #2, #3, #4, #5, #6, #7, #8, #9 in myfaq/assets to your readme.txt
The official readme.txt is a good inspiration

myfaq/index.php 92% from 13 tests

The main PHP file in "MYFAQ Plugin" ver. 1.3.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("myfaq.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected659 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS4174268
PHP43537135
PO File16166129
JavaScript550126
HTML1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
CONTENTS/PHP/white-wave.png3.65KB0.35KB▼ 90.50%
CONTENTS/IMG/myfaq-icon-png.png0.70KB0.64KB▼ 8.50%