78% requird

Code Review | Requird

WordPress plugin Requird scored78%from 54 tests.

About plugin

  • Plugin page: requird
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 19, 2013
  • Latest release: Sep 4, 2014
  • Number of updates: 28
  • Update frequency: every 15.8 days
  • Top authors: gilbarbara (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.97ms] Passed 4 tests

This is a short check of server-side resources used by Requird
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.85 ▼5.23
Dashboard /wp-admin3.36 ▲0.0543.58 ▼7.68
Posts /wp-admin/edit.php3.41 ▲0.0546.22 ▼2.19
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.17 ▼8.76
Media Library /wp-admin/upload.php3.28 ▲0.0537.61 ▲4.78
Requird /wp-admin/tools.php?page=requird3.2229.43

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
requird
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Requird: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▼0.161.71 ▼0.6738.70 ▼10.86
Dashboard /wp-admin2,210 ▲224.88 ▼1.01114.53 ▼1.0742.58 ▲0.12
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0540.75 ▲3.0735.04 ▲2.06
Add New Post /wp-admin/post-new.php1,522 ▲817.70 ▲0.01621.05 ▼71.1562.21 ▼18.98
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0296.50 ▼3.7841.11 ▼2.44
Requird /wp-admin/tools.php?page=requird8732.0225.1630.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • requird
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=requird
    • > Notice in wp-content/plugins/requird/requird-settings.php+197
    Undefined index: post
    • > GET request to /wp-admin/tools.php?page=requird
    • > Notice in wp-content/plugins/requird/requird-settings.php+225
    Undefined index: post-custom
    • > GET request to /wp-admin/tools.php?page=requird
    • > Notice in wp-content/plugins/requird/requird-settings.php+197
    Undefined index: page
    • > GET request to /wp-admin/tools.php?page=requird
    • > Notice in wp-content/plugins/requird/requird-settings.php+225
    Undefined index: page-custom

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/requird/requird-settings.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/requird/requird.php:27

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

requird/requird.php Passed 13 tests

The main PHP file in "Requird" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
27 characters long description:
Require fields for WP-Admin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected336 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24734209
JavaScript158127

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin