84% required-fields

Code Review | Required Fields

WordPress plugin Required Fields scored84%from 54 tests.

About plugin

  • Plugin page: required-fields
  • Plugin version: 1.9.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 10, 2014
  • Latest release: Feb 7, 2018
  • Number of updates: 58
  • Update frequency: every 19.9 days
  • Top authors: NikosTsolakos (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /6,381 total downloads

Benchmarks

Plugin footprint 83% 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.09MB] [CPU: ▼3.04ms] Passed 4 tests

A check of server-side resources used by Required Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.62 ▼1.60
Dashboard /wp-admin3.39 ▲0.0954.76 ▲1.15
Posts /wp-admin/edit.php3.45 ▲0.0952.43 ▲2.80
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.63 ▼10.98
Media Library /wp-admin/upload.php3.32 ▲0.0936.48 ▼0.73
Required Fields /wp-admin/options-general.php?page=Required_Fields3.2935.75

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Required Fields
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.41 ▼0.141.65 ▼0.1945.62 ▼0.61
Dashboard /wp-admin2,196 ▲195.65 ▲0.0286.92 ▼16.2644.85 ▲2.03
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0435.28 ▲0.9637.76 ▲3.69
Add New Post /wp-admin/post-new.php1,547 ▲2123.12 ▼0.08648.79 ▼26.1654.32 ▲3.24
Media Library /wp-admin/upload.php1,407 ▲104.21 ▲0.0697.91 ▼17.5440.98 ▼15.49
Required Fields /wp-admin/options-general.php?page=Required_Fields1,1961.9430.9033.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/required-fields/css/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/required-fields/images/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/required-fields/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/required-fields/required-fields.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/required-fields/includes/index.php:2

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

required-fields/required-fields.php Passed 13 tests

The main PHP file in "Required Fields" ver. 1.9.5 adds more information about the plugin and also serves as the entry point for this plugin
133 characters long description:
Required Fields can help you write your Posts, Pages without forgetting fields, if you forget something you'll be alerted about that!

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
Success! There were no dangerous files found in this plugin837 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36266621
CSS1120216

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cover.png171.05KB57.25KB▼ 66.53%
images/logo.png6.67KB3.37KB▼ 49.46%