10% smart-archives-reloaded

Code Review | Smart Archives Reloaded

WordPress plugin Smart Archives Reloaded scored10%from 54 tests.

About plugin

  • Plugin page: smart-archives-re...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.4
  • WordPress version: 6.3.1
  • First release: Aug 29, 2008
  • Latest release: Mar 21, 2013
  • Number of updates: 217
  • Update frequency: every 7.7 days
  • Top authors: scribu (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /97,255 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/smart-archives-reloaded/admin/admin.php+23
    Declaration of SAR_Settings::validate($args) should be compatible with scbAdminPage::validate($new_data, $old_data)

Server metrics [RAM: ▼1.49MB] [CPU: ▼50.08ms] Passed 4 tests

Server-side resources used by Smart Archives Reloaded
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.14 ▼0.3218.47 ▼24.67
Dashboard /wp-admin2.47 ▼0.8814.51 ▼51.09
Posts /wp-admin/edit.php2.47 ▼0.8914.09 ▼37.72
Add New Post /wp-admin/post-new.php2.47 ▼3.4212.40 ▼85.70
Media Library /wp-admin/upload.php2.47 ▼0.7611.92 ▼25.82
Smart Archives /wp-admin/options-general.php?page=smart-archives2.4713.59

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 71 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
smart-archives

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Archives Reloaded
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲713.24 ▼1.051.79 ▼0.1946.08 ▼0.17
Dashboard /wp-admin2,202 ▲255.58 ▼0.0990.97 ▲0.1841.67 ▼0.99
Posts /wp-admin/edit.php2,104 ▲42.12 ▲0.1341.66 ▼0.1337.99 ▲1.45
Add New Post /wp-admin/post-new.php1,529 ▲323.75 ▲0.60613.37 ▼69.4757.06 ▲1.13
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.1095.24 ▼12.1241.48 ▼4.94
Smart Archives /wp-admin/options-general.php?page=smart-archives9412.0825.4032.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/smart-archives-reloaded/admin/admin.php+23
    Declaration of SAR_Settings::validate($args) should be compatible with scbAdminPage::validate($new_data, $old_data)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=smart-archives
    • > Warning in wp-content/plugins/smart-archives-reloaded/admin/admin.php+23
    Declaration of SAR_Settings::validate($args) should be compatible with scbAdminPage::validate($new_data, $old_data)
    • > GET request to /wp-admin/options-general.php?page=smart-archives
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/options-general.php?page=smart-archives
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=smart-archives
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-archives-reloaded/scb/load.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/smart-archives-reloaded/scb/BoxesPage.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/smart-archives-reloaded/admin/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smart-archives-reloaded/scb/Widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/smart-archives-reloaded/generator.php:340

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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: post list, archive, archives

smart-archives-reloaded/smart-archives-reloaded.php Passed 13 tests

The principal PHP file in "Smart Archives Reloaded" v. 2.0.5 is loaded by WordPress automatically on each request
73 characters long description:
An elegant and easy way to present your posts, grouped by year and month.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin3,812 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP167927082,343
PO File175416811,236
CSS216275
Markdown131067
HTML82065
JavaScript3101626

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.54
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes520.83%
▷ Concrete classes1979.17%
▷ Final classes00.00%
Methods219
▷ Static methods6127.85%
▷ Public methods13963.47%
▷ Protected methods7132.42%
▷ Private methods94.11%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants18.33%
▷ Class constants1191.67%
▷ Public constants11100.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
4 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/archive-year-pointer.png0.23KB0.12KB▼ 47.84%
inc/img/archive-year-background.png0.19KB0.08KB▼ 57.95%
screenshot-2.png31.69KB13.42KB▼ 57.66%
screenshot-1.png23.38KB8.61KB▼ 63.17%