84% collapsed-archives

Code Review | Collapsed Archives

WordPress plugin Collapsed Archives scored84%from 54 tests.

About plugin

  • Plugin page: collapsed-archives
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.7.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Apr 3, 2021
  • Number of updates: 22
  • Update frequency: every 103.9 days
  • Top authors: petroffm (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /10,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.24ms] Passed 4 tests

A check of server-side resources used by Collapsed Archives
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0539.52 ▼1.83
Dashboard /wp-admin3.39 ▲0.0548.66 ▼2.23
Posts /wp-admin/edit.php3.51 ▲0.1154.08 ▼0.96
Add New Post /wp-admin/post-new.php5.98 ▲0.0598.55 ▲1.79
Media Library /wp-admin/upload.php3.32 ▲0.0536.36 ▲0.05

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_collapsed_archives_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Collapsed Archives: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.25 ▼0.321.64 ▲0.0842.77 ▲0.09
Dashboard /wp-admin2,192 ▲125.55 ▼0.0791.00 ▲5.2639.04 ▼8.09
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0440.23 ▼0.3737.70 ▼2.77
Add New Post /wp-admin/post-new.php1,536 ▼118.23 ▲0.02605.16 ▼17.5068.86 ▼6.95
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.02100.55 ▲1.3543.97 ▲1.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_collapsed_archives_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
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: Class 'WP_Widget' not found in wp-content/plugins/collapsed-archives/collapsed-archives.php:173

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: collapsed, archives, collapsing, css

collapsed-archives/collapsed-archives.php Passed 13 tests

This is the main PHP file of "Collapsed Archives" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
73 characters long description:
Adds a widget to display archive links using purely CSS-based collapsing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected236 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13435189
CSS12347

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin