84% accordion-archive-widget

Code Review | Accordion Archive Widget

WordPress plugin Accordion Archive Widget scored 84% from 54 tests.

About plugin

  • Plugin page: accordion-archive...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 5.9.2
  • First release: May 30, 2014
  • Latest release: Dec 12, 2015
  • Number of updates: 4
  • Update frequency: every 140.3 days
  • Top authors: pathartl (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 2,960 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼299.98ms] Passed 4 tests

A check of server-side resources used by Accordion Archive Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0655.99 ▲3.74
Dashboard /wp-admin3.44 ▲0.0335.03 ▼27.95
Posts /wp-admin/edit.php3.67 ▲0.0343.99 ▼9.54
Add New Post /wp-admin/post-new.php6.91 ▼0.06112.47 ▼1,157.52
Media Library /wp-admin/upload.php3.32 ▲0.0328.09 ▼4.91

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
widget_accordion_archives

Browser metrics Passed 4 tests

Accordion Archive Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,903 ▲15915.55 ▼0.089.87 ▲4.022.41 ▲0.47
Dashboard /wp-admin2,895 ▲376.12 ▼0.02118.48 ▼22.69157.19 ▼9.67
Posts /wp-admin/edit.php2,691 ▲33.06 ▼0.1864.11 ▼0.29143.98 ▼0.24
Add New Post /wp-admin/post-new.php1,752 ▲4121.99 ▲0.56456.16 ▼3.31202.41 ▲33.50
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.03129.51 ▼18.59193.55 ▼2.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_accordion_archives

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

SRP 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/accordion-archive-widget/accordion-archive-widget.php:15

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This is an image of the collapsed accordion.), #2 (This is an image of the accordion expanded revealing the months.)
The official readme.txt might help

accordion-archive-widget/accordion-archive-widget.php Passed 13 tests

The primary PHP file in "Accordion Archive Widget" version 1.0.1 is used by WordPress to initiate all plugin functionality
86 characters long description:
An archive widget that collapses the standard archive widget into an accordion by year

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin94 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1292679
CSS1106
JavaScript1316
Markdown1103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png2.87KB1.25KB▼ 56.50%
screenshot-2.png3.95KB1.90KB▼ 51.87%