78% jquery-archive-list-widget

Code Review | JS Archive List Widget

WordPress plugin JS Archive List Widget scored78%from 54 tests.

About plugin

  • Plugin page: jquery-archive-li...
  • Plugin version: 6.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2009
  • Latest release: Jun 16, 2023
  • Number of updates: 114
  • Update frequency: every 43.2 days
  • Top authors: skatox (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

4,000+ active /95,900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.40ms] Passed 4 tests

Analyzing server-side resources used by JS Archive List Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2142.33 ▼2.03
Dashboard /wp-admin3.50 ▲0.1552.41 ▼11.34
Posts /wp-admin/edit.php3.61 ▲0.2648.05 ▼4.00
Add New Post /wp-admin/post-new.php6.09 ▲0.2094.83 ▼0.22
Media Library /wp-admin/upload.php3.42 ▲0.1938.15 ▲2.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by JS Archive List Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.33 ▼0.001.78 ▲0.1043.01 ▼0.09
Dashboard /wp-admin2,198 ▲215.61 ▼0.0787.66 ▼14.8943.60 ▼1.64
Posts /wp-admin/edit.php2,097 ▼32.13 ▲0.1438.56 ▼2.1234.56 ▲2.03
Add New Post /wp-admin/post-new.php6,366 ▲4,83827.54 ▲4.45876.45 ▲188.8938.02 ▼21.04
Media Library /wp-admin/upload.php1,394 ▼94.23 ▼0.0096.82 ▼11.8643.00 ▼4.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_jal_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jquery-archive-list-widget/classes/class-jq-archive-list-block.php
    • > /wp-content/plugins/jquery-archive-list-widget/classes/class-jq-archive-list-datasource.php
    • > /wp-content/plugins/jquery-archive-list-widget/jquery-archive-list-widget.php
    • > /wp-content/plugins/jquery-archive-list-widget/classes/class-jq-archive-list-widget.php
    • > /wp-content/plugins/jquery-archive-list-widget/classes/class-js-archive-list-frontend-utils.php
    • > /wp-content/plugins/jquery-archive-list-widget/admin/class-jaw-walker-category-checklist.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/template.php): failed to open stream: No such file or directory in wp-content/plugins/jquery-archive-list-widget/admin/JAW_Walker_Category_Checklist.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jquery-archive-list-widget/classes/backend/class-js-archive-list-rest-endpoints.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jquery-archive-list-widget/classes/frontend/class-js-archive-list-frontend-widget.php:128
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/jquery-archive-list-widget/admin/JAW_Walker_Category_Checklist.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/jquery-archive-list-widget/admin/JAW_Walker_Category_Checklist.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (A list of the archives, archives for each month are hidden under years.), #2 (A list of archives and its month archives expanded.), #3 (Block options to configure the list.)
Please take inspiration from this readme.txt

jquery-archive-list-widget/jquery-archive-list-widget.php 92% from 13 tests

Analyzing the main PHP file in "JS Archive List Widget" version 6.0.5
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected39,834 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
JSON40036,371
JavaScript26210961,588
PHP132082261,024
PO File9287318696
CSS4146102
Sass310153

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.80
▷ Minimum class complexity2.00
▷ Maximum class complexity74.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods52
▷ Static methods713.46%
▷ Public methods3873.08%
▷ Protected methods59.62%
▷ Private methods917.31%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png22.76KB11.13KB▼ 51.09%
screenshot-2.png10.66KB10.75KB0.00%
screenshot-1.png21.15KB10.31KB▼ 51.24%