84% yearly-archive-facetwp

Code Review | Yearly Archive FacetWP

WordPress plugin Yearly Archive FacetWP scored84%from 54 tests.

About plugin

  • Plugin page: yearly-archive-fa...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Nov 17, 2018
  • Latest release: May 11, 2019
  • Number of updates: 23
  • Update frequency: every 7.7 days
  • Top authors: lucagrandicelli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,348 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.10ms] Passed 4 tests

Server-side resources used by Yearly Archive FacetWP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0945.01 ▼1.32
Dashboard /wp-admin3.39 ▲0.0954.43 ▲2.11
Posts /wp-admin/edit.php3.50 ▲0.1551.13 ▼2.14
Add New Post /wp-admin/post-new.php5.99 ▲0.1090.66 ▼3.06
Media Library /wp-admin/upload.php3.31 ▲0.0839.10 ▲5.62

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
YAF_deferred_admin_notices

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yearly Archive FacetWP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲9413.80 ▼0.558.15 ▲6.2641.19 ▼1.64
Dashboard /wp-admin2,200 ▲205.51 ▼0.1487.50 ▼5.8344.55 ▲2.37
Posts /wp-admin/edit.php2,108 ▲82.02 ▲0.0136.03 ▼4.1638.68 ▲3.37
Add New Post /wp-admin/post-new.php1,534 ▲223.19 ▼0.07664.04 ▼24.9254.36 ▼0.52
Media Library /wp-admin/upload.php1,408 ▲84.20 ▲0.0595.12 ▼9.6043.59 ▼4.01

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • YAF_deferred_admin_notices
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/yearly-archive-facetwp/public/partials/yearly-archive-facetwp-public-display.php
    • > /wp-content/plugins/yearly-archive-facetwp/admin/partials/yearly-archive-facetwp-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === yearly-archive-facetwp === )
You can take inspiration from this readme.txt

yearly-archive-facetwp/yearly-archive-facetwp.php 92% from 13 tests

The main file in "Yearly Archive FacetWP" v. 2.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin346 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP13173628343
JavaScript1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.38
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods411.76%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin