79% accordion-awesome

Code Review | Accordion Plugin by Themes Awesome

WordPress plugin Accordion Plugin by Themes Awesome scored79%from 54 tests.

About plugin

  • Plugin page: accordion-awesome
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: Dec 16, 2022
  • Number of updates: 13
  • Update frequency: every 43.2 days
  • Top authors: themesawesome (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /497 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.81MB] [CPU: ▲2.31ms] Passed 4 tests

Server-side resources used by Accordion Plugin by Themes Awesome
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.56 ▲2.1067.40 ▲19.53
Dashboard /wp-admin5.40 ▲2.0673.94 ▲8.28
Posts /wp-admin/edit.php5.45 ▲2.0975.78 ▲21.66
Add New Post /wp-admin/post-new.php6.92 ▲1.0365.90 ▼37.74
Media Library /wp-admin/upload.php5.30 ▲2.0856.67 ▲19.18
All Accordions /wp-admin/edit.php?post_type=accordion-awesome5.3758.68
Add New /wp-admin/post-new.php?post_type=accordion-awesome5.4972.68

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Accordion Plugin by Themes Awesome
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,204 ▲45819.00 ▲4.625.53 ▲3.7537.91 ▼15.41
Dashboard /wp-admin2,530 ▲3429.29 ▲3.47191.97 ▲81.5039.44 ▼2.28
Posts /wp-admin/edit.php2,460 ▲3716.13 ▲4.1076.88 ▲41.5032.62 ▼2.43
Add New Post /wp-admin/post-new.php6,264 ▲4,74522.16 ▼1.401,000.73 ▲343.3050.10 ▲2.45
Media Library /wp-admin/upload.php1,606 ▲2186.64 ▲2.37110.71 ▲5.4045.05 ▼5.56
All Accordions /wp-admin/edit.php?post_type=accordion-awesome1,4416.1179.9827.78
Add New /wp-admin/post-new.php?post_type=accordion-awesome2,64011.82232.2442.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 139× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Container\\Fulfillable\\Fulfillable' not found in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Fulfillable_Collection.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/core/Service/Revisions_Service.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Custom_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/core/Field/Color_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/core/Service/Meta_Query_Service.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Datastore' not found in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/core/Datastore/Empty_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/accordion-awesome/vendor/ynacorp/carbon-field-uniqid/core/UniqID_Field.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Textarea_Field' not found in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/core/Field/Scripts_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/accordion-awesome/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-awesome/accordion-awesome-post-type.php:7

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 Passed 29 tests

readme.txt Passed 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
3 plugin tags: faq, vertical accordion, accordion

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

This is the main PHP file of "Accordion Plugin by Themes Awesome" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
26 characters long description:
WordPress Accordion Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin45,568 lines of code in 487 files:
LanguageFilesBlank linesComment linesLines of code
CSS193,3721,75116,282
JavaScript1935,5589,04414,279
PHP1842,8967,28110,396
Sass5136701,936
PO File216147831,673
JSON1200797
Markdown6520162
SVG10043

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.02
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces27
Interfaces6
Traits0
Classes137
▷ Abstract classes118.03%
▷ Concrete classes12691.97%
▷ Final classes10.79%
Methods973
▷ Static methods10210.48%
▷ Public methods79481.60%
▷ Protected methods16917.37%
▷ Private methods101.03%
Functions136
▷ Named functions4533.09%
▷ Anonymous functions9166.91%
Constants39
▷ Global constants1435.90%
▷ Class constants2564.10%
▷ 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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/prev.png3.22KB0.41KB▼ 87.13%
public/img/arrow_down.png1.06KB0.24KB▼ 77.47%
public/img/next.png3.23KB0.42KB▼ 87.06%
public/img/arrow_up.png1.03KB0.23KB▼ 77.65%
public/img/down.png2.97KB0.13KB▼ 95.76%