78% options

Code Review | Options

WordPress plugin Options scored78%from 54 tests.

About plugin

  • Plugin page: options
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.8
  • WordPress version: 6.3.1
  • First release: Dec 24, 2013
  • Latest release: Dec 25, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: mirkolofio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /2,295 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Options
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.13 ▼6.40
Dashboard /wp-admin3.31 ▲0.0145.68 ▼3.96
Posts /wp-admin/edit.php3.36 ▲0.0048.92 ▲5.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.76 ▲7.10
Media Library /wp-admin/upload.php3.23 ▲0.0033.83 ▼2.19
Options /wp-admin/options-general.php?page=/wp-admin/options.php3.0123.07

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.30 ▼1.011.77 ▼0.2144.67 ▼1.95
Dashboard /wp-admin2,210 ▲255.89 ▲0.0094.62 ▼27.0239.63 ▼1.83
Posts /wp-admin/edit.php2,093 ▲42.05 ▼0.0939.33 ▲2.0934.06 ▲0.21
Add New Post /wp-admin/post-new.php1,548 ▲2718.24 ▼4.98594.72 ▼77.4061.39 ▲7.76
Media Library /wp-admin/upload.php1,389 ▲14.22 ▼0.0093.43 ▼19.1441.56 ▼2.63
Options /wp-admin/options-general.php?page=/wp-admin/options.php280.440.083.51

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/options/wp-options.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=/wp-admin/options.php
    • > Network (severe)
    wp-admin/options-general.php?page=/wp-admin/options.php - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: option, options, theme, plugin, opt...

options/wp-options.php 92% from 13 tests

This is the main PHP file of "Options" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("options.php" instead of "wp-options.php")

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
Everything looks great! No dangerous files found in this plugin10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11910

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
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 functions00.00%
▷ Anonymous functions1100.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
No PNG files were detected