84% archivespress

Code Review | ArchivesPress: Index Blocks for WordPress

WordPress plugin ArchivesPress: Index Blocks for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: archivespress
  • Plugin version: 3.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2021
  • Latest release: Oct 12, 2023
  • Number of updates: 30
  • Update frequency: every 30.1 days
  • Top authors: GDragoN (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.61ms] Passed 4 tests

Analyzing server-side resources used by ArchivesPress: Index Blocks for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1644.37 ▲1.57
Dashboard /wp-admin3.45 ▲0.1552.80 ▲1.61
Posts /wp-admin/edit.php3.56 ▲0.2149.58 ▼4.61
Add New Post /wp-admin/post-new.php6.04 ▲0.1687.42 ▼13.78
Media Library /wp-admin/upload.php3.37 ▲0.1437.13 ▼1.60

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for ArchivesPress: Index Blocks for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.191.82 ▼0.1043.00 ▲3.14
Dashboard /wp-admin2,195 ▲215.62 ▲0.1099.81 ▲11.5444.38 ▼1.96
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0134.85 ▼10.0935.29 ▼4.05
Add New Post /wp-admin/post-new.php6,367 ▲4,83628.17 ▲5.14848.89 ▲189.8838.40 ▼15.27
Media Library /wp-admin/upload.php1,400 ▼34.24 ▼0.01125.78 ▲26.2040.63 ▼1.47

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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/archivespress/archivespress.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

archivespress/archivespress.php 92% from 13 tests

The main PHP script in "ArchivesPress: Index Blocks for WordPress" version 3.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 143 characters long)

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
Success! There were no dangerous files found in this plugin3,023 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP20374381,112
JSON700576
CSS4140514
JavaScript6100475
Sass10514346

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.59
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces3
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods101
▷ Static methods1312.87%
▷ Public methods6968.32%
▷ Protected methods2726.73%
▷ Private methods54.95%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin