89% accordions

Code Review | Accordion

WordPress plugin Accordion scored 89% from 54 tests.

About plugin

  • Plugin page: accordions
  • Plugin version: 2.2.37
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Oct 27, 2014
  • Latest release: Jan 8, 2022
  • Number of updates: 243
  • Update frequency: every 10.8 days
  • Top authors: pickplugins (67.08%)paratheme (28.4%)wpkids (5.35%)

Code review

54 tests

User reviews

84 reviews

Install metrics

30,000+ active / 618,164 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼294.40ms] Passed 4 tests

Analyzing server-side resources used by Accordion
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1956.67 ▲3.74
Dashboard /wp-admin3.54 ▲0.1333.16 ▼0.51
Posts /wp-admin/edit.php3.77 ▲0.1339.70 ▼0.21
Add New Post /wp-admin/post-new.php7.01 ▲0.0493.56 ▼1,176.77
Media Library /wp-admin/upload.php3.42 ▲0.1324.16 ▼0.09
Settings /wp-admin/edit.php?post_type=accordions&page=settings3.4725.17
All Accordions /wp-admin/edit.php?post_type=accordions3.5226.24
Add New /wp-admin/post-new.php?post_type=accordions3.8641.51

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accordion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,954 ▲20016.24 ▲0.479.98 ▲4.532.63 ▼0.18
Dashboard /wp-admin2,938 ▲776.29 ▲0.10113.77 ▼16.31154.71 ▼8.24
Posts /wp-admin/edit.php2,737 ▲523.26 ▲0.0163.41 ▼2.69136.49 ▼19.49
Add New Post /wp-admin/post-new.php1,698 ▲3718.21 ▲2.05404.91 ▼13.09156.91 ▲1.42
Media Library /wp-admin/upload.php1,748 ▲475.58 ▲0.04135.41 ▼1.09178.78 ▼14.34
Settings /wp-admin/edit.php?post_type=accordions&page=settings3,4126.00137.07123.61
All Accordions /wp-admin/edit.php?post_type=accordions1,3873.1764.71117.50
Add New /wp-admin/post-new.php?post_type=accordions8,0289.74223.07154.89

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_widget_accordions

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #11, #12 in accordions/assets to your readme.txt
  • Screenshots: Screenshot #3 (screenshot-3) image required
You can look at the official readme.txt

accordions/accordions.php Passed 13 tests

"Accordion" version 2.2.37's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Fully responsive and mobile ready accordion grid for wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected32,889 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity78.89
▷ Minimum class complexity3.00
▷ Maximum class complexity641.00
Average method complexity12.49
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions70100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.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
12 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/frontend/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
assets/frontend/css/images/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
assets/frontend/css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
assets/frontend/css/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%