78% accordions-wp

Code Review | Accordion

WordPress plugin Accordion scored78%from 54 tests.

About plugin

  • Plugin page: accordions-wp
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Oct 25, 2020
  • Number of updates: 72
  • Update frequency: every 28.9 days
  • Top authors: themepoints (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /42,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▲0.92ms] Passed 4 tests

A check of server-side resources used by Accordion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4639.48 ▲0.82
Dashboard /wp-admin3.78 ▲0.4848.48 ▼0.65
Posts /wp-admin/edit.php3.83 ▲0.4754.52 ▲0.93
Add New Post /wp-admin/post-new.php6.33 ▲0.4495.23 ▲2.57
Media Library /wp-admin/upload.php3.64 ▲0.4138.60 ▲6.07
All Accordions /wp-admin/edit.php?post_type=accordion_tp3.7540.01
Accordion Pro Features /wp-admin/options-general.php?page=accordion-free-features3.6133.25
Help & Support /wp-admin/edit.php?post_type=accordion_tp&page=support3.6233.49
Add New Accordion /wp-admin/post-new.php?post_type=accordion_tp3.8451.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 71 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Accordion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.86 ▼0.444.56 ▲2.9937.21 ▼3.17
Dashboard /wp-admin2,253 ▲655.16 ▼0.74102.79 ▲0.7872.67 ▲30.69
Posts /wp-admin/edit.php2,141 ▲522.33 ▲0.3338.00 ▲0.7134.84 ▲3.18
Add New Post /wp-admin/post-new.php1,553 ▲2523.26 ▲4.73690.34 ▲54.4336.75 ▼17.25
Media Library /wp-admin/upload.php1,426 ▲384.46 ▲0.2796.11 ▼2.1072.03 ▲28.60
All Accordions /wp-admin/edit.php?post_type=accordion_tp1,1212.3334.7931.03
Accordion Pro Features /wp-admin/options-general.php?page=accordion-free-features1,1231.8928.6956.82
Help & Support /wp-admin/edit.php?post_type=accordion_tp&page=support8702.0928.0026.72
Add New Accordion /wp-admin/post-new.php?post_type=accordion_tp2,7645.67109.77114.63

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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 | 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/accordions-wp/custom-accordion-admin.php
    • > /wp-content/plugins/accordions-wp/custom-accordion-wp.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/accordions-wp/metabox/example-functions.php:104
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordions-wp/metabox/classes.fields.php:581
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordions-wp/metabox/classes.fields.php:581
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/accordions-wp/metabox/custom-meta-boxes.php on line 46
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/accordions-wp/metabox/custom-meta-boxes.php on line 46

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: responsive accordions, jquery accordions, accordions shortcode, accordions, responsive accordions plugin...

accordions-wp/custom-accordion-wp.php 85% from 13 tests

The main file in "Accordion" v. 2.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 233 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("accordions-wp.php" instead of "custom-accordion-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin7,552 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS173251582,999
JavaScript117114532,757
PHP97873701,764
PO File181032

PHP code Passed 2 tests

An overview 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.35
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes00.00%
Methods92
▷ Static methods22.17%
▷ Public methods8895.65%
▷ Protected methods11.09%
▷ Private methods33.26%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
26 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
metabox/css/vendor/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
metabox/css/vendor/jquery-ui/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
css/accordion.png1.74KB1.03KB▼ 40.80%
css/plus_icon_shadow.png1.00KB0.13KB▼ 87.35%
metabox/css/vendor/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%