77% accordion-box

Code Review | Accordion & FAQs

WordPress plugin Accordion & FAQs scored 77% from 54 tests.

About plugin

  • Plugin page: accordion-box
  • Plugin version: 2.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 19, 2020
  • Latest release: May 28, 2023
  • Number of updates: 54
  • Update frequency: every 17.0 days
  • Top authors: codelizarplugs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 1,692 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.34ms] 75% from 4 tests

Analyzing server-side resources used by Accordion & FAQs
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 664.00ms on /wp-admin/admin.php?page=cldzr_more_freeplugs)
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.74 ▲1.28
Dashboard /wp-admin3.35 ▲0.0445.94 ▼4.02
Posts /wp-admin/edit.php3.46 ▲0.1142.99 ▼3.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.41 ▼7.44
Media Library /wp-admin/upload.php3.27 ▲0.0436.35 ▲1.43
Free vs Pro /wp-admin/admin.php?page=cldzr_freediffpro3.2929.83
Add Accordion /wp-admin/post-new.php?post_type=cdlzr_accrodion_box3.4049.63
Upgrade To Pro /wp-admin/admin.php?page=accbox_upgpro3.2731.70
More Free Plugins /wp-admin/admin.php?page=cldzr_more_freeplugs3.58664.00
All Accordion Box /wp-admin/admin.php?page=cdlzr_acc_box3.2429.01

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

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

Browser metrics Passed 4 tests

Accordion & FAQs: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲6013.13 ▼0.191.72 ▲0.0545.63 ▲0.22
Dashboard /wp-admin2,255 ▲465.84 ▲0.0196.62 ▼1.4787.22 ▲45.31
Posts /wp-admin/edit.php2,134 ▲451.99 ▼0.0035.62 ▲2.5336.90 ▼0.00
Add New Post /wp-admin/post-new.php1,566 ▲5223.08 ▲5.57736.71 ▲67.8949.18 ▼8.31
Media Library /wp-admin/upload.php1,437 ▲524.23 ▲0.0395.76 ▼6.9576.82 ▲31.89
Free vs Pro /wp-admin/admin.php?page=cldzr_freediffpro1,0242.0126.6767.48
Add Accordion /wp-admin/post-new.php?post_type=cdlzr_accrodion_box2,8327.34150.26197.10
Upgrade To Pro /wp-admin/admin.php?page=accbox_upgpro9652.0124.4242.38
More Free Plugins /wp-admin/admin.php?page=cldzr_more_freeplugs1,3602.0227.4441.80
All Accordion Box /wp-admin/admin.php?page=cdlzr_acc_box1,8012.7735.3136.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-admin/includes/plugin-install.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/accordion-box/admin/ourfreeplugs.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/accordion-box/admin/ourfreeplugs.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accordion-box/admin/freediffpro.php:18
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/accordion-box/admin/ourfreeplugs.php on line 30
    • > PHP Warning
      include(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/accordion-box/admin/ourfreeplugs.php on line 30

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=cdlzr_accrodion_box
    • > Network (severe)
    wp-content/plugins/accordion-box/admin/assets/images/freeone.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #2, #3, #4, #5, #6, #7, #8, #9 in accordion-box/assets to your readme.txt
  • Tags: Please delete some tags, you are using 32 tag instead of maximum 10
Please take inspiration from this readme.txt

accordion-box/accordion-box.php 85% from 13 tests

The entry point to "Accordion & FAQs" version 2.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 300 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin14,124 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,445
CSS12474742,803
PHP17168821,594
JavaScript877142282

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.62
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods37
▷ Static methods2772.97%
▷ Public methods3594.59%
▷ Protected methods00.00%
▷ Private methods25.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.64MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/style3.PNG28.78KB28.99KB0.00%
admin/assets/images/style1.PNG47.88KB48.22KB0.00%
admin/assets/images/accordion.PNG263.74KB75.82KB▼ 71.25%
admin/assets/images/freeone.PNG99.91KB31.09KB▼ 68.88%
admin/assets/images/style4.PNG118.58KB59.79KB▼ 49.58%