84% options-view

Code Review | Options View

WordPress plugin Options View scored84%from 54 tests.

About plugin

  • Plugin page: options-view
  • Plugin version: 2.10
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Dec 22, 2019
  • Latest release: Oct 31, 2023
  • Number of updates: 37
  • Update frequency: every 38.1 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,916 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼8.35ms] 75% from 4 tests

An overview of server-side resources used by Options View
It is recommended to improve the following
  • RAM: Total memory usage must be kept under 10MB (currently 10.65MB on /wp-admin/tools.php?page=optionsview)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.59 ▲2.41
Dashboard /wp-admin3.42 ▲0.0845.38 ▼20.47
Posts /wp-admin/edit.php3.54 ▲0.1847.08 ▲1.36
Add New Post /wp-admin/post-new.php6.01 ▲0.1190.97 ▼13.10
Media Library /wp-admin/upload.php3.35 ▲0.1134.42 ▼1.18
Options View /wp-admin/tools.php?page=optionsview10.65116.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Options View
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3213.90 ▼0.361.75 ▼0.0244.66 ▼0.26
Dashboard /wp-admin2,199 ▲225.61 ▼0.0196.46 ▼5.1140.44 ▼3.02
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.1338.49 ▼4.6934.57 ▼3.03
Add New Post /wp-admin/post-new.php1,537 ▲918.49 ▼4.53634.32 ▼115.8471.55 ▲18.64
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.0995.62 ▼11.2842.97 ▲0.66
Options View /wp-admin/tools.php?page=optionsview16,2961.1835.95554.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-screen.php): failed to open stream: No such file or directory in wp-content/plugins/options-view/lib/class-tt-optionsview-list-table.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/options-view/lib/class-optionsview.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/options-view/lib/class-optionsview.php:36
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/options-view/lib/class-tt-optionsview-list-table.php on line 26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/options-view/lib/class-tt-optionsview-list-table.php on line 26

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

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: option, database

options-view/optionsview.php 92% from 13 tests

"Options View" version 2.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("options-view.php" instead of "optionsview.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
Everything looks great! No dangerous files found in this plugin621 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP482266621

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity47.00
▷ Minimum class complexity38.00
▷ Maximum class complexity56.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected