83% dynauthor

Code Review | Dynauthor - Dynamic Author Filter

WordPress plugin Dynauthor - Dynamic Author Filter scored83%from 54 tests.

About plugin

  • Plugin page: dynauthor
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.0.3
  • WordPress version: 6.3.1
  • First release: Mar 15, 2013
  • Latest release: Oct 26, 2022
  • Number of updates: 11
  • Update frequency: every 319.9 days
  • Top authors: StuckOn_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /974 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.43ms] Passed 4 tests

Server-side resources used by Dynauthor - Dynamic Author Filter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.50 ▼5.15
Dashboard /wp-admin3.33 ▼0.0153.16 ▼10.52
Posts /wp-admin/edit.php3.38 ▲0.0350.42 ▲1.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.45 ▼25.69
Media Library /wp-admin/upload.php3.25 ▲0.0235.78 ▼0.36
Theme /wp-admin/edit-tags.php?taxonomy=theme3.2436.07

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Dynauthor - Dynamic Author Filter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.43 ▲0.052.14 ▲0.3043.57 ▲4.49
Dashboard /wp-admin2,228 ▲225.90 ▼0.01113.50 ▲4.9942.21 ▼1.56
Posts /wp-admin/edit.php2,139 ▲391.99 ▼0.0237.12 ▲0.3234.13 ▼2.93
Add New Post /wp-admin/post-new.php6,263 ▲4,71626.03 ▲2.75859.09 ▲178.1958.01 ▲5.93
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.08102.95 ▼12.3846.54 ▼5.61
Theme /wp-admin/edit-tags.php?taxonomy=theme1,2532.1425.8231.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynauthor/dynauthor-plugin.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The Dynauthor box in the right sidebar of a post edit screen) image required
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === dynauthor === )
The official readme.txt might help

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

"Dynauthor - Dynamic Author Filter" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("dynauthor.php" instead of "dynauthor-plugin.php")

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
No dangerous file extensions were detected87 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1181087

PHP code Passed 2 tests

This is a very shot review of 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.12
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

PNG files should be compressed to save space and minimize bandwidth usage
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.png5.31KB1.75KB▼ 67.01%