84% lotos-author-fields

Code Review | Lotos Author Fields

WordPress plugin Lotos Author Fields scored84%from 54 tests.

About plugin

  • Plugin page: lotos-author-fields
  • Plugin version: 1.7.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8
  • WordPress version: 6.3.1
  • First release: May 3, 2017
  • Latest release: Jul 10, 2021
  • Number of updates: 45
  • Update frequency: every 34.0 days
  • Top authors: excellentdynamics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,035 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.39ms] Passed 4 tests

Server-side resources used by Lotos Author Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.33 ▼5.48
Dashboard /wp-admin3.31 ▲0.0150.59 ▼5.42
Posts /wp-admin/edit.php3.36 ▲0.0054.92 ▲2.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.75 ▼0.73
Media Library /wp-admin/upload.php3.23 ▲0.0038.07 ▲2.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Lotos Author Fields
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.65 ▲0.301.77 ▼0.0942.76 ▼1.32
Dashboard /wp-admin2,198 ▲215.57 ▼0.1583.08 ▼17.9941.37 ▼0.56
Posts /wp-admin/edit.php2,100 ▼32.03 ▼0.0039.09 ▲1.6436.22 ▲4.64
Add New Post /wp-admin/post-new.php1,537 ▲918.35 ▼4.82621.20 ▼73.5973.25 ▲23.81
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0995.97 ▼5.7744.21 ▼4.39

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lotos-author-fields/lotos-author-fields.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: user, admin, profile

lotos-author-fields/lotos-author-fields.php Passed 13 tests

This is the main PHP file of "Lotos Author Fields" version 1.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
96 characters long description:
Adds additional meta fields for User Profile and link on author page in widget "Recent Comments"

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
There were no executable files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121313

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.45KB16.73KB▼ 70.88%