84% little-free-archive-freshener

Code Review | Little Free Archive Freshener

WordPress plugin Little Free Archive Freshener scored84%from 54 tests.

About plugin

  • Plugin page: little-free-archi...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.1
  • WordPress version: 6.3.1
  • First release: May 14, 2021
  • Latest release: Aug 28, 2023
  • Number of updates: 10
  • Update frequency: every 83.6 days
  • Top authors: samglover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /450 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.58ms] Passed 4 tests

Server-side resources used by Little Free Archive Freshener
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.11 ▼3.59
Dashboard /wp-admin3.32 ▼0.0248.86 ▼20.46
Posts /wp-admin/edit.php3.37 ▲0.0147.20 ▼1.54
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.56 ▼8.72
Media Library /wp-admin/upload.php3.24 ▲0.0135.70 ▲0.14

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
lfaf_expiration_date
widget_recent-comments
can_compress_scripts
lfaf_included_post_types
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Little Free Archive Freshener
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9814.39 ▼0.241.67 ▼0.1038.93 ▼2.22
Dashboard /wp-admin2,250 ▲705.68 ▲0.0385.46 ▼4.4442.75 ▼1.22
Posts /wp-admin/edit.php2,105 ▲52.02 ▲0.0238.83 ▼2.3131.83 ▼4.13
Add New Post /wp-admin/post-new.php1,530 ▲1322.99 ▲3.91597.93 ▲164.9959.32 ▼0.44
Media Library /wp-admin/upload.php1,399 ▼14.24 ▼0.0894.82 ▼1.2939.54 ▼1.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • The uninstall procedure has failed, leaving 8 options in the database
    • lfaf_included_post_types
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • lfaf_expiration_date
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ARCHIVE_FRESHENER\\add_action() in wp-content/plugins/little-free-archive-freshener/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ARCHIVE_FRESHENER\\add_action() in wp-content/plugins/little-free-archive-freshener/options.php:5

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: archive, maintenance, seo

little-free-archive-freshener/little-free-archive-freshener.php Passed 13 tests

The entry point to "Little Free Archive Freshener" version 1.0.2 is a PHP file that has certain tags in its header comment area
129 characters long description:
Little Free Archive Freshener is a helpful dashboard widget that prompts you to update your archives, one post or page at a time.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected265 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35429250
JavaScript19615

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin