89% accordions

Code Review | Accordion

WordPress plugin Accordion scored89%from 54 tests.

About plugin

  • Plugin page: accordions
  • Plugin version: 2.2.96
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 27, 2014
  • Latest release: Nov 29, 2023
  • Number of updates: 347
  • Update frequency: every 9.6 days
  • Top authors: pickplugins (76.95%)paratheme (19.88%)wpkids (3.75%)

Code review

54 tests

User reviews

89 reviews

Install metrics

20,000+ active /1,050,987 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.64MB] [CPU: ▼0.93ms] Passed 4 tests

This is a short check of server-side resources used by Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.14 ▲1.6848.03 ▲6.53
Dashboard /wp-admin4.97 ▲1.6352.29 ▼10.45
Posts /wp-admin/edit.php5.03 ▲1.6758.42 ▲12.21
Add New Post /wp-admin/post-new.php7.54 ▲1.6590.02 ▼11.83
Media Library /wp-admin/upload.php4.84 ▲1.6146.47 ▲12.01
Settings /wp-admin/edit.php?post_type=accordions&page=accordions-settings4.9349.72
All Accordions /wp-admin/edit.php?post_type=accordions4.9449.17
Add New /wp-admin/post-new.php?post_type=accordions5.1263.03

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 92 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_widget_accordions
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Accordion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9114.19 ▲0.121.67 ▼0.0340.05 ▼2.28
Dashboard /wp-admin2,231 ▲535.64 ▼0.0498.14 ▼18.6642.16 ▼3.42
Posts /wp-admin/edit.php2,136 ▲362.00 ▲0.0440.90 ▲3.4135.82 ▼0.08
Add New Post /wp-admin/post-new.php1,557 ▲3022.87 ▼0.32668.61 ▲48.9650.42 ▲4.17
Media Library /wp-admin/upload.php1,433 ▲334.22 ▼0.0496.61 ▲2.3441.94 ▲1.23
Settings /wp-admin/edit.php?post_type=accordions&page=accordions-settings2,3885.4498.8253.19
All Accordions /wp-admin/edit.php?post_type=accordions1,1081.9334.5729.58
Add New /wp-admin/post-new.php?post_type=accordions5,4197.58205.6242.20

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_widget_accordions
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #3 (screenshot-3)
  • Screenshots: Add descriptions for screenshots #11, #12 in accordions/assets to your readme.txt
The official readme.txt is a good inspiration

accordions/accordions.php Passed 13 tests

The principal PHP file in "Accordion" v. 2.2.96 is loaded by WordPress automatically on each request
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 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin33,245 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
SVG4009,251
PHP444,2391608,424
CSS92,4221218,146
JavaScript41,0769747,424

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity80.78
▷ Minimum class complexity3.00
▷ Maximum class complexity641.00
Average method complexity12.58
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods62
▷ Static methods00.00%
▷ Public methods62100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions75
▷ Named functions75100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
assets/global/images/bg/dimension.png0.54KB0.57KB0.00%
assets/frontend/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
assets/admin/images/flat.png6.30KB2.94KB▼ 53.32%
assets/frontend/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%