84% options-framework

Code Review | Options Framework

WordPress plugin Options Framework scored 84% from 54 tests.

About plugin

  • Plugin page: options-framework
  • Plugin version: 1.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.8.3
  • WordPress version: 6.3.1
  • First release: Mar 26, 2011
  • Latest release: Nov 1, 2017
  • Number of updates: 47
  • Update frequency: every 63.6 days
  • Top authors: downstairsdev (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

30,000+ active / 1,447,952 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.90ms] Passed 4 tests

An overview of server-side resources used by Options Framework
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1947.22 ▲3.57
Dashboard /wp-admin3.49 ▲0.1853.23 ▲0.99
Posts /wp-admin/edit.php3.61 ▲0.2556.49 ▲6.60
Add New Post /wp-admin/post-new.php6.08 ▲0.1890.62 ▼3.56
Media Library /wp-admin/upload.php3.42 ▲0.1843.59 ▲9.12

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
optionsframework
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Options Framework
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼013.29 ▼1.115.57 ▲3.5942.93 ▼0.59
Dashboard /wp-admin2,203 ▼65.79 ▲0.95104.32 ▼13.9741.59 ▼0.17
Posts /wp-admin/edit.php2,089 ▲32.00 ▲0.0240.55 ▲4.1636.10 ▲1.53
Add New Post /wp-admin/post-new.php1,519 ▼2323.25 ▲4.72689.45 ▲64.6553.00 ▼17.77
Media Library /wp-admin/upload.php1,391 ▲34.08 ▼0.12106.06 ▲5.6147.85 ▲4.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • optionsframework
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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/options-framework/includes/class-options-sanitization.php:15

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (An example of the "Advanced Options" tab in the "Options Check" theme using this plugin.) image missing
You can look at the official readme.txt

options-framework/options-framework.php Passed 13 tests

"Options Framework" version 1.8.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
39 characters long description:
A framework for building theme options.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,406 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PO File125536461,215
PHP6233480882
CSS174215
JavaScript2322494

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity31.00
▷ Minimum class complexity9.00
▷ Maximum class complexity75.00
Average method complexity6.45
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods522.73%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.14KB20.26KB0.00%
images/ico-delete.png0.70KB0.72KB0.00%