83% dynacat

Code Review | Dynacat - Dynamic Category Filter

WordPress plugin Dynacat - Dynamic Category Filter scored83%from 54 tests.

About plugin

  • Plugin page: dynacat
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.0.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Oct 26, 2022
  • Number of updates: 10
  • Update frequency: every 318.9 days
  • Top authors: StuckOn_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,070 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.11MB] [CPU: ▼5.88ms] Passed 4 tests

A check of server-side resources used by Dynacat - Dynamic Category Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.34 ▼8.69
Dashboard /wp-admin3.31 ▲0.0145.67 ▼1.06
Posts /wp-admin/edit.php3.36 ▲0.0145.79 ▼2.42
Add New Post /wp-admin/post-new.php5.44 ▼0.4580.04 ▼11.33
Media Library /wp-admin/upload.php3.23 ▲0.0134.05 ▼0.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dynacat - Dynamic Category Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.20 ▼1.091.68 ▼0.2538.64 ▼3.22
Dashboard /wp-admin2,211 ▲205.09 ▼0.82106.47 ▲0.4942.05 ▼0.29
Posts /wp-admin/edit.php2,091 ▲52.03 ▲0.0739.01 ▲5.3035.00 ▼2.83
Add New Post /wp-admin/post-new.php6,298 ▲4,78419.56 ▲1.83890.34 ▲291.9155.90 ▲6.50
Media Library /wp-admin/upload.php1,390 ▲84.22 ▲0.0196.12 ▼2.6342.60 ▲1.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynacat/dynacat-plugin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (The Dynacat box in the right sidebar of a post edit screen.)
  • Plugin Name: Please specify the plugin name on the first line ( === dynacat === )
You can look at the official readme.txt

dynacat/dynacat-plugin.php 92% from 13 tests

This is the main PHP file of "Dynacat - Dynamic Category Filter" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dynacat.php" instead of "dynacat-plugin.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 detected113 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1201197
CSS10016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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
Namespaces0
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png6.01KB2.39KB▼ 60.14%