73% wp-default-author

Code Review | WP Default Author

WordPress plugin WP Default Author scored73%from 54 tests.

About plugin

  • Plugin page: wp-default-author
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Oct 3, 2013
  • Latest release: Oct 3, 2013
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: birgire (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /4,008 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼39.48ms] Passed 4 tests

Analyzing server-side resources used by WP Default Author
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.39 ▼2.98
Dashboard /wp-admin3.05 ▼0.3027.81 ▼36.32
Posts /wp-admin/edit.php3.05 ▼0.3124.03 ▼31.91
Add New Post /wp-admin/post-new.php3.05 ▼2.8424.33 ▼78.35
Media Library /wp-admin/upload.php3.05 ▼0.1824.71 ▼11.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Default Author
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.071.76 ▼0.0843.70 ▲2.23
Dashboard /wp-admin2,195 ▲185.57 ▼0.0989.37 ▲0.8642.38 ▲1.47
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0634.61 ▼2.5937.64 ▲2.04
Add New Post /wp-admin/post-new.php1,526 ▼223.10 ▲0.13693.77 ▲16.7355.68 ▲3.93
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.01102.51 ▼5.7544.16 ▼2.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-default-author/index.php+73
    Undefined property: WP_Default_Author::$plugin_comain
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-default-author/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (The global settings are under options-writing.php), #2 (The settings for each user is under profile.php), #3 (The user can always change the author of each post later on)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-default-author === )
Please take inspiration from this readme.txt

wp-default-author/index.php 92% from 13 tests

Analyzing the main PHP file in "WP Default Author" version 1.0.6
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-default-author.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin130 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15765113
Markdown115017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png15.30KB8.84KB▼ 42.27%
screenshot-3.png2.23KB1.94KB▼ 13.29%
screenshot-1.png4.62KB3.44KB▼ 25.66%