84% mhshohel-faq

Code Review | Mhshohel Faq

WordPress plugin Mhshohel Faq scored 84% from 54 tests.

About plugin

  • Plugin page: mhshohel-faq
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 5.8.1
  • First release: Dec 31, 2013
  • Latest release: Nov 27, 2016
  • Number of updates: 12
  • Update frequency: every 88.6 days
  • Top authors: mhshohel (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,558 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼136.29ms] Passed 4 tests

A check of server-side resources used by Mhshohel Faq
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1838.87 ▲16.48
Dashboard /wp-admin3.13 ▲0.0757.43 ▲3.84
Posts /wp-admin/edit.php3.18 ▲0.0749.15 ▲1.06
Add New Post /wp-admin/post-new.php5.49 ▲0.06106.11 ▼541.76
Media Library /wp-admin/upload.php3.07 ▲0.0637.52 ▼8.31
All faqs /wp-admin/edit.php?post_type=faq3.1242.66
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=faq3.0740.37
Add New /wp-admin/post-new.php?post_type=faq3.2161.09
Documentation /wp-admin/admin.php?page=mhshohel-faq-documentation3.0446.97
Faq Settings /wp-admin/admin.php?page=mhshohel-faq/settings_panel.php3.0432.21

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
icon_style
category_children
count
faq_acc_custom_css
is_mhshohel_faq_activated
load_place

Browser metrics Passed 4 tests

An overview of browser requirements for Mhshohel Faq
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,908 ▲26116.39 ▲0.8116.68 ▲4.6053.48 ▲1.53
Dashboard /wp-admin3,034 ▲1005.94 ▼0.11145.73 ▼16.20147.66 ▲26.88
Posts /wp-admin/edit.php2,827 ▲882.71 ▼0.0177.67 ▲0.5799.52 ▲4.10
Add New Post /wp-admin/post-new.php1,731 ▲11618.01 ▼2.87424.69 ▲66.83125.26 ▲7.05
Media Library /wp-admin/upload.php1,821 ▲145.03 ▲0.00167.50 ▼1.56167.23 ▲34.84
All faqs /wp-admin/edit.php?post_type=faq1,5802.6362.9286.33
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=faq1,9982.4067.06100.64
Add New /wp-admin/post-new.php?post_type=faq3,5188.99245.43178.77
Documentation /wp-admin/admin.php?page=mhshohel-faq-documentation1,1492.0959.8469.85
Faq Settings /wp-admin/admin.php?page=mhshohel-faq/settings_panel.php1,3783.7489.35106.05

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • load_place
    • count
    • is_mhshohel_faq_activated
    • icon_style
    • category_children
    • faq_acc_custom_css

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mhshohel-faq/mhshohel-faq.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mhshohel-faq/documentation.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mhshohel-faq/settings_panel.php:43

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === mhshohel-faq === )
  • Screenshots: These screenshots do not have images: #2 (powered by jquery accordion), #3 (controll section)
The official readme.txt is a good inspiration

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

"Mhshohel Faq" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
34 characters long description:
A brief description of the Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,347 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS134491,094
PHP39317246
JavaScript1007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions13
▷ Named functions13100.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
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
asset/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
asset/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
asset/images/faq-icon.png1.85KB1.18KB▼ 36.19%
asset/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%