84% compact-archives

Code Review | Compact Archives

WordPress plugin Compact Archives scored84%from 54 tests.

About plugin

  • Plugin page: compact-archives
  • Plugin version: 4.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8
  • WordPress version: 6.3.1
  • First release: May 9, 2008
  • Latest release: Jul 19, 2021
  • Number of updates: 32
  • Update frequency: every 155.7 days
  • Top authors: deb255 (37.5%)noumaan (34.38%)peterwilsoncc (18.75%)RobMarsh (12.5%)n7studios (9.38%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /48,529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.11ms] Passed 4 tests

Server-side resources used by Compact Archives
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.78 ▼5.45
Dashboard /wp-admin3.38 ▲0.0351.18 ▼12.60
Posts /wp-admin/edit.php3.43 ▲0.0753.90 ▲1.26
Add New Post /wp-admin/post-new.php5.97 ▲0.08106.74 ▲7.23
Media Library /wp-admin/upload.php3.30 ▲0.0733.24 ▼3.66

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_wpb-caw-widget
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Compact Archives
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.37 ▲0.021.72 ▼0.1438.30 ▼4.82
Dashboard /wp-admin2,195 ▲185.64 ▼0.0294.34 ▼7.9442.30 ▼0.29
Posts /wp-admin/edit.php2,097 ▼32.03 ▼0.0039.29 ▼0.7734.60 ▼0.13
Add New Post /wp-admin/post-new.php6,198 ▲4,67019.02 ▼4.09886.42 ▲221.8358.13 ▼12.58
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0698.16 ▼11.5247.48 ▼1.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_wpb-caw-widget

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/compact-archives/inc/class-wpbeginner-caw-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/compact-archives/inc/class-wpbeginner-caw-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: archives, monthly, yearly, montly archive, archive...

compact-archives/compact.php 85% from 13 tests

The main file in "Compact Archives" v. 4.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 172 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("compact-archives.php" instead of "compact.php")

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
Good job! No executable or dangerous file extensions detected541 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP766241330
JavaScript81916177
Markdown18022
CSS22012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin