10% snazzy-archives

Code Review | Snazzy Archives

WordPress plugin Snazzy Archives scored 10% from 54 tests.

About plugin

  • Plugin page: snazzy-archives
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.2
  • WordPress version: 5.8.1
  • First release: Jul 31, 2008
  • Latest release: Dec 22, 2014
  • Number of updates: 33
  • Update frequency: every 70.8 days
  • Top authors: freediver (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active / 102,321 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/snazzy-archives/snazzy-archives.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; SnazzyArchives has a deprecated constructor

Server metrics [RAM: ▼1.68MB] [CPU: ▼196.15ms] Passed 4 tests

An overview of server-side resources used by Snazzy Archives
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.95 ▼0.775.84 ▼13.03
Dashboard /wp-admin1.97 ▼1.089.95 ▼39.41
Posts /wp-admin/edit.php1.97 ▼1.136.59 ▼38.74
Add New Post /wp-admin/post-new.php1.97 ▼3.465.88 ▼675.87
Media Library /wp-admin/upload.php1.97 ▼1.035.70 ▼30.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 1 new option
New WordPress options
SnazzyArchives_options

Browser metrics Passed 4 tests

An overview of browser requirements for Snazzy Archives
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲24316.67 ▲1.0015.67 ▲4.3650.09 ▼6.56
Dashboard /wp-admin2,975 ▲445.96 ▼0.14140.99 ▼18.68110.98 ▼6.09
Posts /wp-admin/edit.php2,741 ▲22.72 ▲0.0170.75 ▼6.54106.97 ▲13.94
Add New Post /wp-admin/post-new.php1,686 ▲18818.51 ▼0.33386.86 ▼13.07104.58 ▼7.94
Media Library /wp-admin/upload.php1,812 ▲25.03 ▼0.00171.97 ▲13.03119.30 ▲5.97
Snazzy Archives /wp-admin/snazzy-archives.php260.900.6711.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/snazzy-archives/snazzy-archives.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; SnazzyArchives has a deprecated constructor
  • The uninstall procedure has failed, leaving 1 option in the database
    • SnazzyArchives_options

Smoke tests 50% 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 | 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
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/snazzy-archives/template_example/snazzy-template.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/snazzy-archives/snazzy-archives-options.php:18
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/snazzy-archives/snazzy-layout-2.php on line 1
    • > PHP Notice
      Undefined variable: action_url in wp-content/plugins/snazzy-archives/snazzy-archives-options.php on line 15
    • > PHP Notice
      Trying to get property 'post_type' of non-object in wp-content/plugins/snazzy-archives/snazzy-layout-2.php on line 1
    • > PHP Notice
      Undefined variable: imgpath in wp-content/plugins/snazzy-archives/snazzy-archives-options.php on line 8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/snazzy-archives/snazzy-layout-2.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/snazzy-archives/snazzy-archives.php:52
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/snazzy-archives/snazzy-layout-1.php:2
    • > PHP Notice
      Undefined variable: first_for_day in wp-content/plugins/snazzy-archives/snazzy-layout-1.php on line 1

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/snazzy-archives.php
    • > Network (severe)
    wp-admin/snazzy-archives.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Snazzy Archives), #2 (Snazzy layout 1 in use)
You can look at the official readme.txt

snazzy-archives/snazzy-archives.php Passed 13 tests

The primary PHP file in "Snazzy Archives" version 1.7.3 is used by WordPress to initiate all plugin functionality
112 characters long description:
Snazzy Archives is a visualization plugin for your WordPress site which creates completely unique archive pages.

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
Good job! No executable or dangerous file extensions detected1,296 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript773183627
PHP519786573
CSS122396

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity115.00
▷ Minimum class complexity115.00
▷ Maximum class complexity115.00
Average method complexity10.50
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
12 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png58.68KB57.97KB▼ 1.22%
i/twit.png0.71KB0.80KB0.00%
i/idea.png0.81KB0.70KB▼ 13.99%
i/home.png0.94KB0.85KB▼ 9.97%
i/mwp250_2.png22.54KB21.97KB▼ 2.52%