84% archivist-custom-archive-templates

Code Review | Archivist - Custom Archive Templates

WordPress plugin Archivist - Custom Archive Templates scored 84% from 54 tests.

About plugin

  • Plugin page: archivist-custom-...
  • Plugin version: 1.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2011
  • Latest release: Feb 14, 2023
  • Number of updates: 160
  • Update frequency: every 26.1 days
  • Top authors: eteubert (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 22,454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.90ms] Passed 4 tests

Server-side resources used by Archivist - Custom Archive Templates
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.87 ▼7.94
Dashboard /wp-admin3.44 ▲0.1445.87 ▼3.59
Posts /wp-admin/edit.php3.55 ▲0.2048.24 ▼0.77
Add New Post /wp-admin/post-new.php6.02 ▲0.1386.92 ▼7.99
Media Library /wp-admin/upload.php3.36 ▲0.1334.57 ▼4.06
Archivist /wp-admin/options-general.php?page=archivist_options_handle3.3028.99

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
archivist
widget_theysaidso_widget
archivist_default_template_name
can_compress_scripts
archivist_version
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Archivist - Custom Archive Templates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.29 ▼0.944.28 ▲2.3341.35 ▼8.68
Dashboard /wp-admin2,213 ▲284.82 ▼1.06108.21 ▲7.2439.74 ▼4.04
Posts /wp-admin/edit.php2,090 ▼22.02 ▼0.0035.61 ▼8.6732.26 ▼6.20
Add New Post /wp-admin/post-new.php1,540 ▼523.35 ▲5.32642.79 ▲18.9763.31 ▲7.30
Media Library /wp-admin/upload.php1,386 ▲14.16 ▲0.0196.01 ▼3.5744.50 ▼1.60
Archivist /wp-admin/options-general.php?page=archivist_options_handle1,9334.1383.0774.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • archivist_version
    • db_upgraded
    • widget_recent-posts
    • archivist
    • archivist_default_template_name
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=archivist_options_handle
    • > Deprecated in wp-content/plugins/archivist-custom-archive-templates/archivist.php+431
    Function get_magic_quotes_gpc() is deprecated

SRP Passed 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 SRP test was a success

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: query, category, loop, tag, archive...

archivist-custom-archive-templates/archivist.php 92% from 13 tests

This is the main PHP file of "Archivist - Custom Archive Templates" version 1.7.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("archivist-custom-archive-templates.php" instead of "archivist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin22,349 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72,5782121,091
PHP218992992
PO File2114204266

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity45.00
▷ Minimum class complexity4.00
▷ Maximum class complexity86.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods39
▷ Static methods37.69%
▷ Public methods2153.85%
▷ Protected methods00.00%
▷ Private methods1846.15%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png46.46KB16.21KB▼ 65.10%