74% wpnice-accordion

Code Review | WP Nice Accordion - Best FAQ Accordion Plugin for WordPress

WordPress plugin WP Nice Accordion - Best FAQ Accordion Plugin for WordPress scored 74% from 54 tests.

About plugin

  • Plugin page: wpnice-accordion
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2022
  • Latest release: Aug 27, 2022
  • Number of updates: 11
  • Update frequency: every 1.6 days
  • Top authors: wpniceplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 213 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.88MB] [CPU: ▲26.12ms] Passed 4 tests

A check of server-side resources used by WP Nice Accordion - Best FAQ Accordion Plugin for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.49 ▲5.0375.66 ▲32.41
Dashboard /wp-admin8.51 ▲5.2178.44 ▲28.71
Posts /wp-admin/edit.php8.51 ▲5.1688.19 ▲37.80
Add New Post /wp-admin/post-new.php10.02 ▲4.14114.33 ▲5.55
Media Library /wp-admin/upload.php8.51 ▲5.2874.02 ▲38.36
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius8.5162.20

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 282 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
fs_active_plugins
fs_accounts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
fs_debug_mode
fs_gdpr
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Nice Accordion - Best FAQ Accordion Plugin for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲21614.24 ▼0.347.25 ▲5.5133.31 ▼10.02
Dashboard /wp-admin2,262 ▲715.09 ▲0.20111.83 ▲9.7840.88 ▲2.09
Posts /wp-admin/edit.php2,153 ▲642.51 ▲0.5142.94 ▲2.4538.44 ▲3.91
Add New Post /wp-admin/post-new.php1,553 ▲2022.06 ▼0.75725.34 ▲101.8238.10 ▼27.66
Media Library /wp-admin/upload.php1,447 ▲564.48 ▲0.26102.13 ▲3.1047.21 ▲4.32
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius1,0992.1031.6728.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wpnice-accordion/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • fs_accounts
    • fs_debug_mode
    • fs_gdpr
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_active_plugins

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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 take a closer look at the following
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'WPNICE_ACCORDION_PATHadmin/wpnp-framework/classes/setup.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpnice-accordion/admin/metabox/fields.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wpnice-accordion/includes/view/layout2.php on line 4
    • > PHP Warning
      require(WPNICE_ACCORDION_PATHadmin/wpnp-framework/classes/setup.class.php): failed to open stream: No such file or directory in wp-content/plugins/wpnice-accordion/admin/metabox/fields.php on line 1
    • > PHP Notice
      Undefined variable: acoordion_id in wp-content/plugins/wpnice-accordion/includes/view/layout2.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpnice-accordion/includes/assets.php:15
    • > PHP Notice
      Undefined variable: accordion_data in wp-content/plugins/wpnice-accordion/includes/view/layout2.php on line 4
    • > PHP Notice
      Undefined variable: acoordion_id in wp-content/plugins/wpnice-accordion/includes/view/layout1.php on line 2
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/wpnice-accordion/includes/view/layout2.php on line 2
    • > PHP Warning
      Use of undefined constant WPNICE_ACCORDION_PATH - assumed 'WPNICE_ACCORDION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpnice-accordion/admin/metabox/fields.php on line 1
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/wpnice-accordion/includes/view/layout1.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (36 tag instead of maximum 10)
The official readme.txt might help

wpnice-accordion/wpnice-accordion.php Passed 13 tests

The main PHP file in "WP Nice Accordion - Best FAQ Accordion Plugin for WordPress" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
70 characters long description:
Fully Responsive and Mobile Friendly Faq/Accordion/QA Showcase plugin.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin53,896 lines of code in 226 files:
LanguageFilesBlank linesComment linesLines of code
PHP1758,90316,90536,191
JavaScript111,3295606,762
Sass1696935,667
CSS193905214,950
Markdown1680214
LESS15183
JSON10027
SVG2002

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity50.28
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes102
▷ Abstract classes43.92%
▷ Concrete classes9896.08%
▷ Final classes00.00%
Methods1,308
▷ Static methods20115.37%
▷ Public methods96874.01%
▷ Protected methods151.15%
▷ Private methods32524.85%
Functions124
▷ Named functions124100.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants10280.31%
▷ Class constants2519.69%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/wpnp-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%